manoj 99/03/16 13:26:27
Modified: pthreads/src/main http_main.c
Log:
Allow the server to exit in single-process (-X) mode when we hit Ctrl-C.
This involves making the server respond to SIGINT like it does with
SIGTERM in the signal-handling thread.
Revision Changes Path
1.59 +4 -0 apache-apr/pthreads/src/main/http_main.c
Index: http_main.c
===================================================================
RCS file: /home/cvs/apache-apr/pthreads/src/main/http_main.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -u -r1.58 -r1.59
--- http_main.c 1999/03/15 15:34:50 1.58
+++ http_main.c 1999/03/16 21:26:26 1.59
@@ -2103,6 +2103,7 @@
sigemptyset(&sig_mask);
sigaddset(&sig_mask, SIGWINCH);
sigaddset(&sig_mask, SIGTERM);
+ sigaddset(&sig_mask, SIGINT);
sigwait(&sig_mask, &signal_received);
/* XXX - Do the appropriate thing for each signal */
switch (signal_received) {
@@ -2114,6 +2115,9 @@
case SIGTERM:
just_die(SIGTERM);
break;
+ case SIGINT:
+ just_die(SIGINT);
+ break;
default:
ap_log_error(APLOG_MARK, APLOG_ALERT, server_conf,
"received strange signal: %d", signal_received);