chet.ra...@case.edu wrote in <88762e56-0276-f936-cf4c-d48c8ddc2...@case.edu>: |On 4/29/22 4:23 PM, Robert Elz via austin-group-l at The Open Group wrote: ... |> true & X=$! ... |They're not jobs! A pid is a pid. It doesn't matter whether it's the pid of |the job's controlling process (or whatever we want to call it). The |Asynchronous Lists text says you have to be able to wait for it. This is |how bash works, too. | |This is what happens when you have a jobs list and a list of terminated |asynchronous lists that are `known in the current shell environment'. ...
A bit off-topic, but it would be nice if scripts would be given a hand to signal childs in a safe way. I can wait(1) on a PID maybe, but timeout(1) is not standardized (nor can it be already i think, -- though maybe i should simply open an issue?), and so there is no safe way to collect multiple PIDs while also being able to kill(1) them when they exceed a time limit. This can only be done by means of synchronization of some stamp file or so, but if i kill(1) a PID i do not know whether it was my PID or already a reused PID that belongs to another program. Yet the sh(1) does know whether that PID is still our child or not. --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)