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 c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature