On 3/23/19 12:31 PM, Robert Elz wrote:
> | If you want to associated an exit status with a process, changing wait -n
> | wouldn't make a difference.
>
> It does when you add the "-p var" option, which returns the pid of the
> process (job) that exited as $var
If I add that, I might change the semantics of `wait -n' to match the
NetBSD shell's in the case where -n and -p are both supplied.
>
> | What's your goal here? If you want to associate an exit status with a
> | process, you're going to have to save $! and wait for each process in
> | turn.
>
> That involves predicting what order the processes are going to exit.
Sure. That isn't the case here, though. A SIGHLD trap should do the job
Ben needs.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/