Skip to content

Commit

Permalink
libsubprocess: fix error path bug
Browse files Browse the repository at this point in the history
Problem: the subprocess server ignored failure of cmd_set_env().

This was introduced by flux-framework#6661 which was just merged.  Oops!

Fix error path.
  • Loading branch information
garlick committed Feb 25, 2025
1 parent 4b0a520 commit 1254d78
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/common/libsubprocess/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,10 @@ static void server_exec_cb (flux_t *h,
* environment.
*/
if (env[0] == NULL) {
if (cmd_set_env (cmd, environ) < 0)
if (cmd_set_env (cmd, environ) < 0) {
errmsg = "error setting up command environment";
goto error;
}
}
/* Ensure FLUX_URI points to the local broker (overwrite).
*/
Expand Down

0 comments on commit 1254d78

Please sign in to comment.