fix for crash without arrays built in; allow some job status changes while the jobs list is frozen; change format for interactive shell terminated job notifications; allow some job notifications while running traps

This commit is contained in:
Chet Ramey
2024-05-06 11:15:17 -04:00
parent 1f42d15864
commit d17d185fff
13 changed files with 205 additions and 79 deletions
+5 -1
View File
@@ -2695,7 +2695,7 @@ execute_pipeline (COMMAND *command, int asynchronous, int pipe_in, int pipe_out,
prev = NO_PIPE;
add_unwind_protect (uw_restore_stdin, (void *) (intptr_t) lstdin);
lastpipe_flag = 1;
old_frozen = freeze_jobs_list ();
old_frozen = freeze_jobs_list (1);
lastpipe_jid = stop_pipeline (0, (COMMAND *)NULL); /* XXX */
add_unwind_protect (uw_lastpipe_cleanup, (void *) (intptr_t) old_frozen);
#if defined (JOB_CONTROL)
@@ -2831,6 +2831,10 @@ execute_connection (COMMAND *command, int asynchronous, int pipe_in, int pipe_ou
#endif
QUIT;
#if defined (JOB_CONTROL)
if (command->value.Connection->connector == ';' && job_control && interactive)
notify_and_cleanup ();
#endif
optimize_connection_fork (command); /* XXX */
exec_result = execute_command_internal (command->value.Connection->second,
asynchronous, pipe_in, pipe_out,