gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r36251 - gnunet/src/fs


From: gnunet
Subject: [GNUnet-SVN] r36251 - gnunet/src/fs
Date: Tue, 18 Aug 2015 20:00:21 +0200

Author: grothoff
Date: 2015-08-18 20:00:21 +0200 (Tue, 18 Aug 2015)
New Revision: 36251

Modified:
   gnunet/src/fs/gnunet-auto-share.c
Log:
tolerate spurious SIGCHLD in gnunet-auto-share

Modified: gnunet/src/fs/gnunet-auto-share.c
===================================================================
--- gnunet/src/fs/gnunet-auto-share.c   2015-08-18 17:51:07 UTC (rev 36250)
+++ gnunet/src/fs/gnunet-auto-share.c   2015-08-18 18:00:21 UTC (rev 36251)
@@ -378,6 +378,8 @@
                                      &maint_child_death, wi);
     return;
   }
+  /* consume the signal */
+  GNUNET_break (0 < GNUNET_DISK_file_read (pr, &c, sizeof (c)));
 
   ret = GNUNET_OS_process_status (publish_proc,
                                  &type,
@@ -385,21 +387,20 @@
   GNUNET_assert (GNUNET_SYSERR != ret);
   if (GNUNET_NO == ret)
   {
-    /* process still running? Well, how did we get here?
-       Anyway, answer is to kill it! */
+    /* process still running? Then where did the SIGCHLD come from?
+       Well, let's declare it spurious (kernel bug?) and keep rolling.
+    */  
     GNUNET_break (0);
-    GNUNET_OS_process_kill (publish_proc, 
-                           SIGKILL);
-    ret = GNUNET_OS_process_status (publish_proc,
-                                   &type,
-                                   &code);
+    run_task =
+      GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
+                                     pr,
+                                     &maint_child_death, wi);
+    return;
   }
   GNUNET_assert (GNUNET_OK == ret);
   
   GNUNET_OS_process_destroy (publish_proc);
   publish_proc = NULL;
-  /* consume the signal */
-  GNUNET_break (0 < GNUNET_DISK_file_read (pr, &c, sizeof (c)));
 
   if (GNUNET_YES == do_shutdown)
   {




reply via email to

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