in posix mode, don't notify about other terminated jobs if the jobs builtin is listing individual jobs; in posix mode, if `wait pid' finds pid in bgpids, remove it from there

This commit is contained in:
Chet Ramey
2024-09-20 14:47:56 -04:00
parent bc5ddc8698
commit 8d74195d7f
18 changed files with 2564 additions and 2166 deletions
+9 -2
View File
@@ -5847,7 +5847,8 @@ The shell always postpones exiting if any jobs are stopped.
@item checkwinsize
If set, Bash checks the window size after each external (non-builtin)
command and, if necessary, updates the values of
@env{LINES} and @env{COLUMNS}.
@env{LINES} and @env{COLUMNS},
using the file descriptor associated with stderr if it is a terminal.
This option is enabled by default.
@item cmdhist
@@ -8555,6 +8556,11 @@ printing the status of a background job that changes status or a foreground
job that terminates due to a signal.
Non-interactive shells print status messages after a foreground job completes.
@item
Bash permanently removes jobs from the jobs table after notifying the
user of their termination, whether that is via @code{wait}, @code{jobs},
or interactive shell notification before prompting.
@item
Alias expansion is always enabled, even in non-interactive shells.
@@ -9244,7 +9250,8 @@ The shell learns immediately whenever a job changes state.
Normally, Bash waits until it is about to print a prompt
before reporting changes in a job's status so as to not interrupt
any other output,
though it will notify of changes in a job's status after a command in
though it will notify of changes in a job's status after a
foreground command in
a list completes, before executing the next command.
If the @option{-b} option to the @code{set} builtin is enabled,
Bash reports such changes immediately (@pxref{The Set Builtin}).