From ec7defa829bebf80acccfa3fc80e62523be11a1a Mon Sep 17 00:00:00 2001 From: "Christopher J. Morrone" <morrone2@llnl.gov> Date: Fri, 2 Dec 2005 19:02:39 +0000 Subject: [PATCH] Change some return codes to make srun happy --- src/common/global_srun.c | 6 ++++-- src/slurmd/slurmd/req.c | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/common/global_srun.c b/src/common/global_srun.c index 17bf9ab1e4d..6a7c7c417ea 100644 --- a/src/common/global_srun.c +++ b/src/common/global_srun.c @@ -207,8 +207,10 @@ static void * _p_signal_task(void *args) * Report error unless it is "Invalid job id" which * probably just means the tasks exited in the meanwhile. */ - if ((rc != 0) && (rc != ESLURM_INVALID_JOB_ID) - && (rc != ESLURMD_JOB_NOTRUNNING) && (rc != ESRCH)) { + if ((rc != 0) + && (rc != ESLURM_INVALID_JOB_ID) + && (rc != ESLURMD_JOB_NOTRUNNING) + && (rc != ESRCH)) { error("%s: signal: %s", host, slurm_strerror(rc)); } diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index b19d0e56ea7..6cb3a438e58 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -857,7 +857,7 @@ _rpc_signal_tasks(slurm_msg_t *msg, slurm_addr *cli_addr) req->job_id, req->job_step_id); if (fd == -1) { error("stepd_connect failed: %m"); - rc = EPERM; + rc = ESLURM_INVALID_JOB_ID; goto done; } if ((step = stepd_get_info(fd)) == NULL) { @@ -916,7 +916,7 @@ _rpc_terminate_tasks(slurm_msg_t *msg, slurm_addr *cli_addr) req->job_id, req->job_step_id); if (fd == -1) { error("stepd_connect failed: %m"); - rc = EPERM; + rc = ESLURM_INVALID_JOB_ID; goto done; } if (!(step = stepd_get_info(fd))) { @@ -1048,7 +1048,7 @@ _rpc_reattach_tasks(slurm_msg_t *msg, slurm_addr *cli) req->job_id, req->job_step_id); if (fd == -1) { error("stepd_connect failed: %m"); - rc = EPERM; + rc = ESLURM_INVALID_JOB_ID; goto done; } if ((step = stepd_get_info(fd)) == NULL) { -- GitLab