--- stunnel-4.10/src/network.c.inetd 2005-06-01 11:39:36.000000000 +0200 +++ stunnel-4.10/src/network.c 2005-06-01 11:43:38.000000000 +0200 @@ -32,7 +32,7 @@ #include "prototypes.h" #ifndef USE_WIN32 -static int signal_pipe[2]; +static int signal_pipe[2] = { -1, -1 }; static char signal_buffer[16]; static void sigchld_handler(int); static void signal_pipe_empty(void); @@ -136,7 +136,7 @@ do { /* skip "Interrupted system call" errors */ retry=0; retval=poll(ufds, nfds, min_timeout<0 ? -1 : 1000*min_timeout); - if(retval>0 && (*signal_revents & POLLIN)) { + if(retval>0 && signal_revents && (*signal_revents & POLLIN)) { signal_pipe_empty(); /* no timeout -> main loop */ retry=1; }