Skip to content

Commit

Permalink
Merge pull request #5922 from grondo/issue#5921
Browse files Browse the repository at this point in the history
job-manager: perilog: do not set working directory on subprocesses
  • Loading branch information
mergify[bot] committed Apr 30, 2024
2 parents bff958b + c7e985e commit 62bb46d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/modules/job-manager/plugins/perilog.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,6 @@ static int run_command (flux_plugin_t *p,
.on_stdout = io_cb,
.on_stderr = io_cb
};
char path[PATH_MAX + 1];

if (flux_plugin_arg_unpack (args,
FLUX_PLUGIN_ARG_IN,
Expand All @@ -325,8 +324,7 @@ static int run_command (flux_plugin_t *p,
return -1;
}

if (flux_cmd_setcwd (cmd, getcwd (path, sizeof (path))) < 0
|| flux_cmd_setenvf (cmd, 1, "FLUX_JOB_ID", "%s", idf58 (id)) < 0
if (flux_cmd_setenvf (cmd, 1, "FLUX_JOB_ID", "%s", idf58 (id)) < 0
|| flux_cmd_setenvf (cmd, 1, "FLUX_JOB_USERID", "%u", userid) < 0) {
flux_log_error (h, "%s: flux_cmd_create", prolog ? "prolog" : "epilog");
return -1;
Expand Down

0 comments on commit 62bb46d

Please sign in to comment.