Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-eq committed Mar 19, 2024
1 parent 78227d2 commit dd507da
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/clib/lib/job_queue/lsf_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -735,19 +735,23 @@ void lsf_driver_kill_job(void *_driver, void *_job) {
char **argv = (char **)calloc(2, sizeof *argv);
CHECK_ALLOC(argv);
argv[0] = driver->remote_lsf_server;
argv[1] = saprintf("%s %s %s", driver->bkill_cmd, "-s KILL",
argv[1] = saprintf("%s %s %s", driver->bkill_cmd, "-s SIGKILL",
job->lsf_jobnr_char);

spawn_blocking(driver->rsh_cmd, 2, (const char **)argv, NULL, NULL);

free(argv[1]);
free(argv);
} else if (driver->submit_method == LSF_SUBMIT_LOCAL_SHELL) {
char **argv = (char **)calloc(1, sizeof *argv);
char **argv = (char **)calloc(3, sizeof *argv);
CHECK_ALLOC(argv);
argv[0] = saprintf("%s %s", "-s KILL", job->lsf_jobnr_char);
spawn_blocking(driver->bkill_cmd, 1, (const char **)argv, NULL, NULL);
argv[0] = saprintf("%s", "-s");
argv[1] = saprintf("%s", "SIGKILL");
argv[2] = saprintf("%s", job->lsf_jobnr_char);
spawn_blocking(driver->bkill_cmd, 3, (const char **)argv, NULL, NULL);
free(argv[0]);
free(argv[1]);
free(argv[2]);
free(argv);
}
}
Expand Down

0 comments on commit dd507da

Please sign in to comment.