diff options
author | Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk> | 2011-08-18 18:41:23 +0100 |
---|---|---|
committer | Steven Murdoch <Steven.Murdoch@cl.cam.ac.uk> | 2011-08-18 18:41:23 +0100 |
commit | 7d015c886a3fc985ab767de01811d1591f0ac86a (patch) | |
tree | 0ebc4c18e133ac803a1c1813ec4d86bd2b4a94e5 /src/common/util.h | |
parent | 5bf9890b3b18ad98f5ac601992bc08533ce9e209 (diff) | |
download | tor-7d015c886a3fc985ab767de01811d1591f0ac86a.tar.gz tor-7d015c886a3fc985ab767de01811d1591f0ac86a.zip |
Complete logging of output from port forwarding helper
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/util.h b/src/common/util.h index 2efe557857..40fe305651 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -349,7 +349,7 @@ HANDLE load_windows_system_library(const TCHAR *library_name); /* Prototypes for private functions only used by util.c (and unit tests) */ typedef struct process_handle_s { - int status; + int status; // 0: not running; 1: running; -1: error #ifdef MS_WINDOWS HANDLE stdout_pipe; HANDLE stderr_pipe; @@ -357,13 +357,15 @@ typedef struct process_handle_s { #else int stdout_pipe; int stderr_pipe; + FILE *stdout_handle; + FILE *stderr_handle; int pid; #endif // MS_WINDOWS } process_handle_t; process_handle_t tor_spawn_background(const char *const filename, const char **argv); -int tor_get_exit_code(const process_handle_t pid); +int tor_get_exit_code(const process_handle_t pid, int block); ssize_t tor_read_all_handle(HANDLE h, char *buf, size_t count, HANDLE hProcess); ssize_t tor_read_all_from_process_stdout(const process_handle_t process_handle, char *buf, size_t count); |