[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Actually close the stdout pipe on error in process_unix_exec
commit df1a8a657eadcc156032aa558ae0395cde878ee8
Author: Kris Katterjohn <katterjohn@xxxxxxxxx>
Date: Fri Jan 4 13:48:08 2019 -0600
Actually close the stdout pipe on error in process_unix_exec
When cleaning up after an error in process_unix_exec, the stdin
pipe was being double closed instead of closing both the stdin
and stdout pipes. This occurred in two places.
Signed-off-by: Kris Katterjohn <katterjohn@xxxxxxxxx>
---
src/lib/process/process_unix.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/lib/process/process_unix.c b/src/lib/process/process_unix.c
index 57ca69a76..dd4ccbf60 100644
--- a/src/lib/process/process_unix.c
+++ b/src/lib/process/process_unix.c
@@ -183,8 +183,8 @@ process_unix_exec(process_t *process)
close(stdin_pipe[1]);
/** Cleanup standard out pipe. */
- close(stdin_pipe[0]);
- close(stdin_pipe[1]);
+ close(stdout_pipe[0]);
+ close(stdout_pipe[1]);
return PROCESS_STATUS_ERROR;
}
@@ -281,8 +281,8 @@ process_unix_exec(process_t *process)
close(stdin_pipe[1]);
/** Cleanup standard out pipe. */
- close(stdin_pipe[0]);
- close(stdin_pipe[1]);
+ close(stdout_pipe[0]);
+ close(stdout_pipe[1]);
/** Cleanup standard error pipe. */
close(stderr_pipe[0]);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits