Closed chu11 closed 1 month ago
nevermind ... we check that the process is still running at all appropriate locations e.g.
while (p) {
if (flux_subprocess_state (p) == FLUX_SUBPROCESS_INIT
|| flux_subprocess_state (p) == FLUX_SUBPROCESS_RUNNING) {
if (flux_subprocess_write (p, "stdin", ptr, lenp) < 0)
log_err_exit ("flux_subprocess_write");
}
p = zlist_next (subprocesses);
}
Problem: If a subprocess fails for some reason in
flux-exec
, it still remains in the globalsubprocesses
list. That means that operations on the whole list, such as killing all subprocesses or sending stdin to subprocesses, will continue to operate on those failed subprocesses.Solution: When a subprocess fails, it should be removed from the global list.