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