From a22414eea08d79ef1d6b1683543a533d500a6e6d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 17 Dec 2012 10:54:41 +0000 Subject: [PATCH] -respect vfork semantics --- src/util/os_priority.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/os_priority.c b/src/util/os_priority.c index c773c2399..ba2034c89 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c @@ -931,7 +931,10 @@ start_process (int pipe_control, if (NULL != childpipename) { setenv (GNUNET_OS_CONTROL_PIPE, childpipename, 1); +#ifndef DARWIN + /* due to vfork, we must NOT free memory on DARWIN! */ GNUNET_free (childpipename); +#endif } if (NULL != pipe_stdin) { @@ -1004,7 +1007,10 @@ start_process (int pipe_control, GNUNET_snprintf (fds, sizeof (fds), "%u", i); setenv ("LISTEN_FDS", fds, 1); } +#ifndef DARWIN + /* due to vfork, we must NOT free memory on DARWIN! */ GNUNET_array_grow (lscp, ls, 0); +#endif execvp (filename, argv); LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "execvp", filename); _exit (1); -- 2.25.1