On Monday, January 29, 2024, Greg Wooledge <g...@wooledge.org> wrote: > > Anyway... a script writer who has a basic familiarity with wait(2) and > who reads about "wait -n" will probably assume that wait -n will return > immediately if a child process has already terminated and hasn't been > "pseudo-reaped" by a previous "wait" command yet. If three children > have terminated, then the next three "wait -n" commands should return > immediately, and the fourth should block (assuming a fourth child exists). >
This is the case with me. There is no point in having `wait -n' if it can't distinguish a single job terminating from multiple jobs terminating between subsequent calls. -- Oğuz