[stunnel-users] Re: service reconfiguration by SIGHUP (updated patch)

Matthew Eaton stunnel at divinehawk.com
Fri Dec 15 01:05:48 CET 2006


Sorry for yet another correction. This change is also needed otherwise
you'll get 100% cpu usage. The original code was not designed to
handle timeouts correctly.

Matt

network.c   2006-12-14 19:02:37.000000000 -0500
@@ -260,7 +260,7 @@
     do { /* skip "Interrupted system call" errors */
         retry=0;
         retval=poll(fds->ufds, fds->nfds, sec<0 ? -1 : 1000*sec+msec);
-        if(sec<0 && retval>0 && s_poll_canread(fds, signal_pipe[0])) {
+        if(retval>0 && s_poll_canread(fds, signal_pipe[0])) {
             signal_pipe_empty(); /* no timeout -> main loop */
             retry=1;
         }



More information about the stunnel-users mailing list