You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bi...@apache.org on 2003/12/31 06:03:26 UTC
cvs commit: jakarta-commons/daemon/src/native/unix/native jsvc-unix.c
billbarker 2003/12/30 21:03:26
Modified: daemon/src/native/unix/native jsvc-unix.c
Log:
Fix problems with signal handling on Solaris (possibly others).
Fix for Bug #24247
Reported By: Peter Poloha peter.poloha@nextra.sk
Revision Changes Path
1.8 +4 -4 jakarta-commons/daemon/src/native/unix/native/jsvc-unix.c
Index: jsvc-unix.c
===================================================================
RCS file: /home/cvs/jakarta-commons/daemon/src/native/unix/native/jsvc-unix.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- jsvc-unix.c 27 Sep 2003 16:49:13 -0000 1.7
+++ jsvc-unix.c 31 Dec 2003 05:03:25 -0000 1.8
@@ -271,10 +271,10 @@
/*
* Return the address of the current signal handler and set the new one.
*/
-static void * signal_set(int sig, void * handler) {
+static void * signal_set(int sig, void * newHandler) {
void *hand;
- hand=signal(sig,handler);
+ hand=signal(sig,newHandler);
#ifdef SIG_ERR
if (hand==SIG_ERR)
hand=NULL;
@@ -350,7 +350,7 @@
/* Install signal handlers */
handler_hup=signal_set(SIGHUP,handler);
handler_trm=signal_set(SIGTERM,handler);
- handler_trm=signal_set(SIGINT,handler);
+ handler_int=signal_set(SIGINT,handler);
controlled = getpid();
log_debug("Waiting for a signal to be delivered");
while (!stopping) sleep(60); /* pause() not threadsafe */
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org