diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-12-17 10:54:41 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-12-17 10:54:41 +0000 |
commit | a22414eea08d79ef1d6b1683543a533d500a6e6d (patch) | |
tree | cd9076c59306819f151f9eb290be57d7f9a7f8ac /src/util/os_priority.c | |
parent | 3cd74a0fcf964bee1b4bfd185fb8aa755a3fd089 (diff) | |
download | gnunet-a22414eea08d79ef1d6b1683543a533d500a6e6d.tar.gz gnunet-a22414eea08d79ef1d6b1683543a533d500a6e6d.zip |
-respect vfork semantics
Diffstat (limited to 'src/util/os_priority.c')
-rw-r--r-- | src/util/os_priority.c | 6 |
1 files changed, 6 insertions, 0 deletions
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, | |||
931 | if (NULL != childpipename) | 931 | if (NULL != childpipename) |
932 | { | 932 | { |
933 | setenv (GNUNET_OS_CONTROL_PIPE, childpipename, 1); | 933 | setenv (GNUNET_OS_CONTROL_PIPE, childpipename, 1); |
934 | #ifndef DARWIN | ||
935 | /* due to vfork, we must NOT free memory on DARWIN! */ | ||
934 | GNUNET_free (childpipename); | 936 | GNUNET_free (childpipename); |
937 | #endif | ||
935 | } | 938 | } |
936 | if (NULL != pipe_stdin) | 939 | if (NULL != pipe_stdin) |
937 | { | 940 | { |
@@ -1004,7 +1007,10 @@ start_process (int pipe_control, | |||
1004 | GNUNET_snprintf (fds, sizeof (fds), "%u", i); | 1007 | GNUNET_snprintf (fds, sizeof (fds), "%u", i); |
1005 | setenv ("LISTEN_FDS", fds, 1); | 1008 | setenv ("LISTEN_FDS", fds, 1); |
1006 | } | 1009 | } |
1010 | #ifndef DARWIN | ||
1011 | /* due to vfork, we must NOT free memory on DARWIN! */ | ||
1007 | GNUNET_array_grow (lscp, ls, 0); | 1012 | GNUNET_array_grow (lscp, ls, 0); |
1013 | #endif | ||
1008 | execvp (filename, argv); | 1014 | execvp (filename, argv); |
1009 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "execvp", filename); | 1015 | LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "execvp", filename); |
1010 | _exit (1); | 1016 | _exit (1); |