aboutsummaryrefslogtreecommitdiff
path: root/src/util/os_priority.c
diff options
context:
space:
mode:
authorgrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-12-17 10:54:41 +0000
committergrothoff <grothoff@140774ce-b5e7-0310-ab8b-a85725594a96>2012-12-17 10:54:41 +0000
commit4d342569afbcaf23be52358fd49dccebe98f6171 (patch)
treecd9076c59306819f151f9eb290be57d7f9a7f8ac /src/util/os_priority.c
parentada6ae7bccecbd3419e0d2aba2ea6c37ad6c0f89 (diff)
-respect vfork semantics
git-svn-id: https://gnunet.org/svn/gnunet@25500 140774ce-b5e7-0310-ab8b-a85725594a96
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r--src/util/os_priority.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index c773c23995..ba2034c891 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);