[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 'wait -n' with and without id arguments
From: |
Chet Ramey |
Subject: |
Re: 'wait -n' with and without id arguments |
Date: |
Wed, 14 Aug 2024 15:21:44 -0400 |
User-agent: |
Mozilla Thunderbird |
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.
It's not, but there might be some value here.
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.
I'm not sure returning the status of some random process from some
arbitrary point in the past is going to be valuable.
Maybe the thing to do is to retain jobs in the job list, even after
they're marked as notified, until the user runs `jobs' or does a `wait',
as POSIX (more or less) wants. Since people aren't used to doing that,
and it would potentially explode the size of the jobs list, it would have
to be an opt-in thing based on a new shell option.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
- Re: 'wait -n' with and without id arguments, (continued)
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/07
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/07
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/12
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/12
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/14
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/15
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/21
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/21
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/12
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/12
- Re: 'wait -n' with and without id arguments,
Chet Ramey <=
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/14
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/16
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/26
- Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/26
- Re: 'wait -n' with and without id arguments, Zachary Santer, 2024/08/30
Message not available
Message not availableRe: 'wait -n' with and without id arguments, Robert Elz, 2024/08/21
Re: 'wait -n' with and without id arguments, Chet Ramey, 2024/08/09