Blame SOURCES/xinetd-2.3.14-signal-log-hang.patch

319196
--- a/xinetd/signals.c	2009-05-07 05:56:52.000000000 -0400
319196
+++ b/xinetd/signals.c.new	2009-05-07 05:56:44.000000000 -0400
319196
@@ -389,9 +390,11 @@
319196
          break ;
319196
       
319196
       default:
319196
-         msg( LOG_NOTICE, func, "Unexpected signal %s", sig_name( sig ) ) ;
319196
-         if ( debug.on && sig == SIGINT )
319196
-            exit( 1 ) ;
319196
+         /* Let my_handler() queue this signal for later logging.
319196
+            Calling msg() and thus syslog() directly here can hang up
319196
+            the process, trying to acquire an already acquired lock,
319196
+            because another syslog() could have been the interrupted code. */
319196
+         my_handler(sig);
319196
    }
319196
 }
319196
 
319196
@@ -495,6 +497,9 @@
319196
          default:
319196
             msg(LOG_ERR, func, "unexpected signal: %s in signal pipe", 
319196
                sig_name(sig));
319196
+
319196
+            if ( debug.on && sig == SIGINT )
319196
+               exit( 1 ) ;
319196
       }
319196
    }
319196
 }