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

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