On 8/7/24 2:47 PM, Zachary Santer wrote:
Now I understand that this is because the list of terminated child processes that 'wait -n' currently ignores is only used in the interactive shell.
Do you mean when no arguments are supplied? It's not. The difference is when a job is marked as notified and eligible to be removed from the jobs list.
If you want the behavior of 'wait -n' to be consistent between scripts and the interactive shell, then it should choose one terminated child process from the list of those that is maintained in the interactive shell, if it's nonempty, to report to the user and to clear from that list, any time it is called.
That would make it different from wait without -n. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature