wait -n' notifies on a job it returns; in posix mode, wait' defers notification on a reaped pid unless the shell is interactive, as posix now specifies

This commit is contained in:
Chet Ramey
2024-09-11 15:54:24 -04:00
parent 5576c26da8
commit bc5ddc8698
17 changed files with 988 additions and 783 deletions
+1 -1
View File
@@ -2863,7 +2863,7 @@ execute_connection (COMMAND *command, int asynchronous, int pipe_in, int pipe_ou
QUIT;
#if defined (JOB_CONTROL)
if (command->value.Connection->connector == ';' && job_control && interactive && posixly_correct == 0)
notify_and_cleanup ();
notify_and_cleanup (-1);
#endif
optimize_connection_fork (command); /* XXX */
exec_result = execute_command_internal (command->value.Connection->second,