Пример #1
0
extern int proctrack_p_wait(uint64_t cont_id)
{
    int delay = 1;

    if (cont_id == 0 || cont_id == 1) {
        errno = EINVAL;
        return SLURM_ERROR;
    }

    /* Spin until the container is successfully destroyed */
    /* This indicates that all tasks have exited the container */
    while (proctrack_p_destroy(cont_id) != SLURM_SUCCESS) {
        proctrack_p_signal(cont_id, SIGKILL);
        sleep(delay);
        if (delay < 120) {
            delay *= 2;
        } else {
            error("%s: Unable to destroy container %"PRIu64" "
                  "in cgroup plugin, giving up after %d sec",
                  __func__, cont_id, delay);
            break;
        }
    }

    return SLURM_SUCCESS;
}
Пример #2
0
extern int
proctrack_p_wait(uint64_t cont_id)
{
	if (cont_id == 0 || cont_id == 1) {
		errno = EINVAL;
		return SLURM_ERROR;
	}

	return proctrack_p_destroy(cont_id);
}