[LON-CAPA-cvs] cvs: loncom / lonhttpd
www
lon-capa-cvs@mail.lon-capa.org
Wed, 30 Jul 2003 15:28:56 -0000
www Wed Jul 30 11:28:56 2003 EDT
Modified files:
/loncom lonhttpd
Log:
Bug #2001: child process does not wipe out parent's .pid-file when timing
out during a request.
Index: loncom/lonhttpd
diff -u loncom/lonhttpd:1.8 loncom/lonhttpd:1.9
--- loncom/lonhttpd:1.8 Tue Jul 1 15:57:45 2003
+++ loncom/lonhttpd Wed Jul 30 11:28:56 2003
@@ -1,5 +1,5 @@
#!/usr/bin/perl
-# $Id: lonhttpd,v 1.8 2003/07/01 19:57:45 albertel Exp $
+# $Id: lonhttpd,v 1.9 2003/07/30 15:28:56 www Exp $
$VERSION = "1.3.2 (Demonic/Linux/LON-CAPA Derivative $Revison$)";
@@ -260,7 +260,9 @@
}
-sub bye { unlink($pidfile); exit; }
+sub bye { exit; }
+
+sub goodbye { unlink($pidfile); exit; }
sub dead {
&htsponse(500, "Server Error");
@@ -276,7 +278,8 @@
}
$SIG{'__DIE__'} = \&dead;
-$SIG{'ALRM'} = $SIG{'TERM'} = $SIG{'INT'} = \&bye;
+$SIG{'ALRM'} = \&bye;
+$SIG{'TERM'} = $SIG{'INT'} = \&goodbye;
sub master {
$0 = "lonhttpd: (dhttpi) handling request";