gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r32336 - msh/src


From: gnunet
Subject: [GNUnet-SVN] r32336 - msh/src
Date: Thu, 13 Feb 2014 15:34:07 +0100

Author: harsha
Date: 2014-02-13 15:34:06 +0100 (Thu, 13 Feb 2014)
New Revision: 32336

Modified:
   msh/src/mshd.c
Log:
- unblock signal mask to receive SIGINT and SIGKILL signals.


Modified: msh/src/mshd.c
===================================================================
--- msh/src/mshd.c      2014-02-13 14:09:12 UTC (rev 32335)
+++ msh/src/mshd.c      2014-02-13 14:34:06 UTC (rev 32336)
@@ -541,12 +541,15 @@
 spawn_worker (struct GNUNET_NETWORK_Handle *sock)
 {
   struct ChildProc *chld;
+  sigset_t sigset;
   pid_t ret;
 
   ret = fork ();
   if (0 != ret)
     return ret;
   /* Child process continues here */
+  GNUNET_break (0 == sigemptyset (&sigset));
+  GNUNET_assert (0 == sigprocmask (SIG_SETMASK, &sigset, NULL));
   client_conn = GNUNET_CONNECTION_create_from_existing (sock);
   sock = NULL;
   GNUNET_log_setup ("mshd-worker", NULL, NULL);
@@ -840,6 +843,7 @@
   struct GNUNET_DISK_PipeHandle *pipe;
   struct GNUNET_DISK_FileHandle *read_end;
   struct GNUNET_DISK_FileHandle *write_end;
+  sigset_t sigset;
   intmax_t pid;
   int total_rounds;
 
@@ -889,6 +893,9 @@
   }
   if (0 == pid)
   {
+    
+    GNUNET_break (0 == sigemptyset (&sigset));
+    GNUNET_assert (0 == sigprocmask (SIG_SETMASK, &sigset, NULL));
     GNUNET_DISK_file_close (write_end);
     write_end = NULL;
     worker_sigfd = read_end;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]