gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnunet] branch master updated: use _exit in signal handler


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: use _exit in signal handlers
Date: Mon, 20 May 2019 00:01:09 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 426317707 use _exit in signal handlers
426317707 is described below

commit 426317707f34282830e5595193fcf2546c7d5b49
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon May 20 00:00:40 2019 +0200

    use _exit in signal handlers
---
 src/transport/gnunet-service-tng.c | 10 ++++++++++
 src/util/gnunet-timeout.c          | 33 +++++++++++----------------------
 2 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/src/transport/gnunet-service-tng.c 
b/src/transport/gnunet-service-tng.c
index f009a491b..20285f94a 100644
--- a/src/transport/gnunet-service-tng.c
+++ b/src/transport/gnunet-service-tng.c
@@ -44,6 +44,16 @@
  *   - increment incoming_fc_window_size_used_kb when CORE is done
  *     with incoming packets!
  *
+ *   for DV)
+ *   - send challenges via DV (when DVH is confirmed *and* we care about
+ *     the target to get window size, or when DVH is unconfirmed (passive
+ *     learning!) to confirm it!)
+ *   - handle challenge responses in this case (note: validity period of 
addresses
+ *     will be zero!)
+ *   - if available, try to use DV paths when trying to establish
+ *     virtual link for a `struct IncomingRequest`. (i.e. if DVH is
+ *     unconfirmed, incoming requests also trigger challenge-via-DV!)
+ *
  * - review retransmission logic, right now there is no smartness there!
  *   => congestion control, etc [PERFORMANCE-BASICS]
  *
diff --git a/src/util/gnunet-timeout.c b/src/util/gnunet-timeout.c
index 18721ba03..d71b66af4 100644
--- a/src/util/gnunet-timeout.c
+++ b/src/util/gnunet-timeout.c
@@ -41,42 +41,33 @@ sigchld_handler (int val)
   int ret = 0;
 
   (void) val;
-  waitpid (child,
-           &status,
-           0);
+  waitpid (child, &status, 0);
   if (WIFEXITED (status) != 0)
   {
     ret = WEXITSTATUS (status);
-    fprintf (stderr,
-             "Process exited with result %u\n",
-             ret);
-    exit (ret); /* return same status code */
+    fprintf (stderr, "Process exited with result %u\n", ret);
+    _exit (ret); /* return same status code */
   }
   if (WIFSIGNALED (status) != 0)
   {
     ret = WTERMSIG (status);
-    fprintf (stderr,
-             "Process received signal %u\n",
-             ret);
-    kill (getpid (),
-          ret); /* kill self with the same signal */
+    fprintf (stderr, "Process received signal %u\n", ret);
+    kill (getpid (), ret); /* kill self with the same signal */
   }
-  exit (-1);
+  _exit (-1);
 }
 
 
 static void
 sigint_handler (int val)
 {
-  kill (0,
-        val);
-  exit (val);
+  kill (0, val);
+  _exit (val);
 }
 
 
 int
-main (int argc,
-      char *argv[])
+main (int argc, char *argv[])
 {
   int timeout = 0;
   pid_t gpid = 0;
@@ -111,8 +102,7 @@ main (int argc,
     //setpgrp (0, pid_t gpid);
     if (-1 != gpid)
       setpgid (0, gpid);
-    execvp (argv[2],
-            &argv[2]);
+    execvp (argv[2], &argv[2]);
     exit (-1);
   }
   if (child > 0)
@@ -120,8 +110,7 @@ main (int argc,
     sleep (timeout);
     printf ("Child processes were killed after timeout of %u seconds\n",
             timeout);
-    kill (0,
-          SIGTERM);
+    kill (0, SIGTERM);
     exit (3);
   }
   exit (-1);

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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