[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wait -n misses signaled subprocess
From: |
Chet Ramey |
Subject: |
Re: wait -n misses signaled subprocess |
Date: |
Tue, 30 Jan 2024 10:37:30 -0500 |
User-agent: |
Mozilla Thunderbird |
On 1/30/24 10:14 AM, Steven Pelley wrote:
OK. Can you think of a use case that would break if wait -n looked at
terminated processes?
Yes. If one were to start a number of bg jobs and repeatedly send the
list of pids to wait -n (probably redirecting stderr to /dev/null to
ignore messages about unknown jobs) today you'd process the jobs one
at a time, assuming no races between job completion. If wait -n
looked at terminated processes you'd return jobs repeatedly and
possibly end up in an infinite loop.
OK, that argues for a new option to provide this functionality.
--
``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 misses signaled subprocess, (continued)
- Re: wait -n misses signaled subprocess, Steven Pelley, 2024/01/28
- Re: wait -n misses signaled subprocess, Dale R. Worley, 2024/01/28
- Re: wait -n misses signaled subprocess, Chet Ramey, 2024/01/30
- Re: wait -n misses signaled subprocess, Steven Pelley, 2024/01/30
- Re: wait -n misses signaled subprocess, Chet Ramey, 2024/01/30
- Re: wait -n misses signaled subprocess, Steven Pelley, 2024/01/30
- Re: wait -n misses signaled subprocess, Steven Pelley, 2024/01/30
- Re: wait -n misses signaled subprocess,
Chet Ramey <=
- Re: wait -n misses signaled subprocess, Robert Elz, 2024/01/30
- Re: wait -n misses signaled subprocess, Chet Ramey, 2024/01/30
- Re: wait -n misses signaled subprocess, Chet Ramey, 2024/01/30
Re: wait -n misses signaled subprocess, Robert Elz, 2024/01/29