Try to fix process spawning
authorLRN <lrn1986@gmail.com>
Fri, 15 Feb 2013 10:03:22 +0000 (10:03 +0000)
committerLRN <lrn1986@gmail.com>
Fri, 15 Feb 2013 10:03:22 +0000 (10:03 +0000)
src/util/os_priority.c

index 68b63908d3b897d8839c3a51bd7081871a5094bf..e4bb41cf5d5f6501d3309237993985a5225415b5 100644 (file)
@@ -655,6 +655,7 @@ start_process (int pipe_control,
   {
     childpipe_read = NULL;
     childpipe_write = NULL;
+    childpipe_read_fd = -1;
   }
   if (NULL != pipe_stdout)
   {
@@ -730,6 +731,8 @@ start_process (int pipe_control,
     snprintf (fdbuf, 100, "%x", childpipe_read_fd);
     setenv (GNUNET_OS_CONTROL_PIPE, fdbuf, 1);
   }
+  else
+    unsetenv (GNUNET_OS_CONTROL_PIPE);
   if (NULL != pipe_stdin)
   {
     GNUNET_break (0 == close (fd_stdin_write));