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

Re: hppa problems

On Jun 11,  9:35am, Andrej Borsenkow wrote:
} 3. There is an obvious race condition here (between call to sigsuspend and
} child exit).

No, there's no race condition.  These two lines:

    sigprocmask(SIG_SETMASK, &set, 0);

mean that SIGCHLD is blocked (along with all other blockable signals).
The sigsuspend() then should unblock SIGCHLD and either wait for the
child to exit, or immediately allow the signal to be delivered if the
child has exited already, and then return.  The test is in part trying
to demonstrate that the implicit race-resolution in this block/suspend
pair does in fact resolve the race.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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