From: Christian Grothoff Date: Mon, 17 Dec 2012 10:54:41 +0000 (+0000) Subject: -respect vfork semantics X-Git-Tag: initial-import-from-subversion-38251~10388 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a22414eea08d79ef1d6b1683543a533d500a6e6d;p=oweals%2Fgnunet.git -respect vfork semantics --- 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);