Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: wait gets confused when second argument exits before first (i think)



On Apr 10,  3:37am, Mikael Magnusson wrote:
}
} So it looks like it doesn't matter if %1 or %2 exits first, just which
} is the first argument to wait.

The wait isn't performed in parallel for all the argument PIDs at once
(it's not like doing a select() on a list of file descriptors).  Rather
the shell waits for each PID in the order it appears on the command
line, before attempting to wait on the next one.

See zsh-workers/27442 and its thread for possibly-related discussion;
there doesn't appear to be a requirement that the shell keep track of
more than one already-exited asynchronous job.

-- 



Messages sorted by: Reverse Date, Date, Thread, Author