diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-02-03 20:42:57 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-02-03 20:42:57 +0100 |
commit | 7f5fd7963788dde45815cc45304cc636b33dfcc7 (patch) | |
tree | 31f7f3786cfedb628fa402986db1625981aa94b8 /src/daemon | |
parent | 85ccecace0bca33aed545915899abe8ca441382d (diff) | |
download | wolfbones-7f5fd7963788dde45815cc45304cc636b33dfcc7.tar.gz wolfbones-7f5fd7963788dde45815cc45304cc636b33dfcc7.tar.bz2 |
fixed signals on FreeBSD (SIGCHLD)
Diffstat (limited to 'src/daemon')
-rw-r--r-- | src/daemon/signals.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/daemon/signals.c b/src/daemon/signals.c index 3e4036a..c80546a 100644 --- a/src/daemon/signals.c +++ b/src/daemon/signals.c @@ -155,6 +155,7 @@ static wolf_error_t vsignal_install_ignore( int sig, va_list ap ) { char errbuf[1024]; install_ignore_again: + if( sig == 0 ) return WOLF_OK; memset( &sa, 0, sizeof( struct sigaction ) ); sa.sa_handler = SIG_IGN; @@ -190,6 +191,7 @@ static wolf_error_t vsignal_install_empty( int sig, va_list ap ) { char errbuf[1024]; install_empty_again: + if( sig == 0 ) return WOLF_OK; memset( &sa, 0, sizeof( struct sigaction ) ); sa.sa_handler = empty_handler; @@ -442,9 +444,16 @@ wolf_error_t wolf_signal_install_handlers_parent( void ) { #endif #if defined( SIGCLD ) SIGCLD, +#endif +#endif /* SIGCLD != SIGCHLD */ +#else +#if defined( SIGCHLD ) + SIGCHLD, #endif -#endif -#endif +#if defined( SIGCLD ) + SIGCLD, +#endif +#endif /* defined( SIGCHLD ) && defined( SIGCLD ) */ 0 ) ) != WOLF_OK ) return error; /* fatal signal handlers, make sure the parent can read the @@ -516,9 +525,16 @@ wolf_error_t wolf_signal_install_handlers_daemon( void ) { #endif #if defined( SIGCLD ) SIGCLD, +#endif +#endif /* SIGCLD != SIGCHLD */ +#else +#if defined( SIGCHLD ) + SIGCHLD, #endif -#endif -#endif +#if defined( SIGCLD ) + SIGCLD, +#endif +#endif /* defined( SIGCHLD ) && defined( SIGCLD ) */ 0 ) ) != WOLF_OK ) return error; /* fatal signal handlers, log the exception and continue with |