Re: [PATCH] Add timeout utility

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux