gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r26112 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r26112 - gnunet/src/util
Date: Thu, 14 Feb 2013 17:15:03 +0100

Author: LRN
Date: 2013-02-14 17:15:03 +0100 (Thu, 14 Feb 2013)
New Revision: 26112

Modified:
   gnunet/src/util/os_priority.c
Log:
W32: Don't leak stdin/stdout when spawning

If stdin/stdout pipe is provided by us, AND we tell start_process() to
pass along our own current stdin/stdout, our current stdin/stdout will
be leaked to the child (child will have a copy, but won't know about it).

Modified: gnunet/src/util/os_priority.c
===================================================================
--- gnunet/src/util/os_priority.c       2013-02-14 16:08:23 UTC (rev 26111)
+++ gnunet/src/util/os_priority.c       2013-02-14 16:15:03 UTC (rev 26112)
@@ -1189,7 +1189,7 @@
                                        &stdin_handle, sizeof (HANDLE));
     start.hStdInput = stdin_handle;
   }
-  if (stdih)
+  else if (stdih)
   {
     if (std_inheritance & GNUNET_OS_INHERIT_STD_IN)
     {
@@ -1212,7 +1212,7 @@
                                        &stdout_handle, sizeof (HANDLE));
     start.hStdOutput = stdout_handle;
   }
-  if (stdoh)
+  else if (stdoh)
   {
     if (std_inheritance & GNUNET_OS_INHERIT_STD_OUT)
     {




reply via email to

[Prev in Thread] Current Thread [Next in Thread]