On Tuesday 01 April 2008, Pádraig Brady wrote: > + /* Setup handlers before fork() so that we > + * handle any signals caused by child, without races. */ > + signal (SIGALRM, cleanup); /* our timeout. */ > + signal (SIGINT, cleanup); /* Ctrl-C at terminal for example. */ > + signal (SIGQUIT, cleanup); /* Ctrl-\ at terminal for example. */ > + signal (SIGTERM, cleanup); /* if we're killed, stop monitored > process. */ + signal (SIGHUP, cleanup); /* terminal closed for > example. */ + signal (SIGTTIN, SIG_IGN); /* don't sTop if background > child needs tty. */ + signal (SIGTTOU, SIG_IGN); /* don't sTop if > background child needs tty. */ if you're using signal(), you have race problems. why not use sigaction() and friends instead ? -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.