[LON-CAPA-cvs] cvs: newloncapa / loncnew

foxr lon-capa-cvs@mail.lon-capa.org
Wed, 16 Apr 2003 12:10:41 -0000


foxr		Wed Apr 16 08:10:41 2003 EDT

  Modified files:              
    /newloncapa	loncnew 
  Log:
  Turn off signals I might get for now in child and parent.
  
  
  
Index: newloncapa/loncnew
diff -u newloncapa/loncnew:1.7 newloncapa/loncnew:1.8
--- newloncapa/loncnew:1.7	Fri Apr 11 22:47:49 2003
+++ newloncapa/loncnew	Wed Apr 16 08:10:40 2003
@@ -18,7 +18,7 @@
 use lib "/home/httpd/lib/perl/";
 use lib "/home/foxr/newloncapa/types";
 use Event qw(:DEFAULT );
-use POSIX;
+use POSIX qw(:signal_h);
 use IO::Socket;
 use IO::Socket::INET;
 use IO::Socket::UNIX;
@@ -32,6 +32,17 @@
 
 print "Loncnew starting\n";
 
+#
+#   Disable all signals we might receive from outside for now.
+#
+$SIG{QUIT}  = IGNORE;
+$SIG{HUP}   = IGNORE;
+$SIG{USR1}  = IGNORE;
+$SIG{INT}   = IGNORE;
+$SIG{CHLD}  = IGNORE;
+$SIG{__DIE__}  = IGNORE;
+
+
 # Read the httpd configuration file to get perl variables
 # normally set in apache modules:
 
@@ -761,6 +772,16 @@
 sub ChildProcess {
 
     print "Loncnew\n";
+
+    # For now turn off signals.
+    
+    $SIG{QUIT}  = IGNORE;
+    $SIG{HUP}   = IGNORE;
+    $SIG{USR1}  = IGNORE;
+    $SIG{INT}   = IGNORE;
+    $SIG{CHLD}  = IGNORE;
+    $SIG{__DIE__}  = IGNORE;
+
     SetupTimer();
     
     SetupLoncListener();