[LON-CAPA-cvs] cvs: loncom / lond

foxr foxr@source.lon-capa.org
Tue, 11 Jan 2011 10:32:00 -0000


foxr		Tue Jan 11 10:32:00 2011 EDT

  Modified files:              
    /loncom	lond 
  Log:
  Block sigpipe in children here as well to allow clean closes.
  
  
Index: loncom/lond
diff -u loncom/lond:1.467 loncom/lond:1.468
--- loncom/lond:1.467	Sun Dec 19 19:32:49 2010
+++ loncom/lond	Tue Jan 11 10:32:00 2011
@@ -2,7 +2,7 @@
 # The LearningOnline Network
 # lond "LON Daemon" Server (port "LOND" 5663)
 #
-# $Id: lond,v 1.467 2010/12/19 19:32:49 www Exp $
+# $Id: lond,v 1.468 2011/01/11 10:32:00 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -58,7 +58,7 @@
 my $status='';
 my $lastlog='';
 
-my $VERSION='$Revision: 1.467 $'; #' stupid emacs
+my $VERSION='$Revision: 1.468 $'; #' stupid emacs
 my $remoteVERSION;
 my $currenthostid="default";
 my $currentdomainid;
@@ -6395,6 +6395,13 @@
                                 #don't get intercepted
         $SIG{USR1}= \&logstatus;
         $SIG{ALRM}= \&timeout;
+	#
+	# Block sigpipe as it gets thrownon socket disconnect and we want to 
+	# deal with that as a read faiure instead.
+	#
+	my $blockset = POSIX::SigSet->new(SIGPIPE);
+	sigprocmask(SIG_BLOCK, $blockset);
+
         $lastlog='Forked ';
         $status='Forked';