aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-02-14 16:15:03 +0000
committerLRN <lrn1986@gmail.com>2013-02-14 16:15:03 +0000
commit2c3613ca587b571d45ea29da1f6ed15dace0b527 (patch)
treea7b7146e8fd6889ad1de87f740ac796df9d55bfb /src/util
parent53b9610e3c851b38d677e5d820572dbd7ba7ee27 (diff)
downloadgnunet-2c3613ca587b571d45ea29da1f6ed15dace0b527.tar.gz
gnunet-2c3613ca587b571d45ea29da1f6ed15dace0b527.zip
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).
Diffstat (limited to 'src/util')
-rw-r--r--src/util/os_priority.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/os_priority.c b/src/util/os_priority.c
index ba2034c89..6074a1f24 100644
--- a/src/util/os_priority.c
+++ b/src/util/os_priority.c
@@ -1189,7 +1189,7 @@ start_process (int pipe_control,
1189 &stdin_handle, sizeof (HANDLE)); 1189 &stdin_handle, sizeof (HANDLE));
1190 start.hStdInput = stdin_handle; 1190 start.hStdInput = stdin_handle;
1191 } 1191 }
1192 if (stdih) 1192 else if (stdih)
1193 { 1193 {
1194 if (std_inheritance & GNUNET_OS_INHERIT_STD_IN) 1194 if (std_inheritance & GNUNET_OS_INHERIT_STD_IN)
1195 { 1195 {
@@ -1212,7 +1212,7 @@ start_process (int pipe_control,
1212 &stdout_handle, sizeof (HANDLE)); 1212 &stdout_handle, sizeof (HANDLE));
1213 start.hStdOutput = stdout_handle; 1213 start.hStdOutput = stdout_handle;
1214 } 1214 }
1215 if (stdoh) 1215 else if (stdoh)
1216 { 1216 {
1217 if (std_inheritance & GNUNET_OS_INHERIT_STD_OUT) 1217 if (std_inheritance & GNUNET_OS_INHERIT_STD_OUT)
1218 { 1218 {