Skip to content
Permalink
Browse files
Provide a tor_process_get_stderr_pipe() function
We already have the rest of the utilities needed for handling stderr
handles. Just need the actual higher-level function to get the pipe.

This is needed for #9957.
  • Loading branch information
wfn committed Apr 19, 2014
1 parent b571b96 commit 9b3ef629225fa3a0fea0a7090a3ee8a4b14ffab1
Showing with 15 additions and 0 deletions.
  1. +13 −0 src/common/util.c
  2. +2 −0 src/common/util.h
@@ -3600,13 +3600,26 @@ tor_process_get_stdout_pipe(process_handle_t *process_handle)
{
return process_handle->stdout_pipe;
}

HANDLE
tor_process_get_stderr_pipe(process_handle_t *process_handle)
{
return process_handle->stderr_pipe;
}
#else
/* DOCDOC tor_process_get_stdout_pipe */
FILE *
tor_process_get_stdout_pipe(process_handle_t *process_handle)
{
return process_handle->stdout_handle;
}

/* DOCDOC tor_process_get_stderr_pipe */
FILE *
tor_process_get_stderr_pipe(process_handle_t *process_handle)
{
return process_handle->stderr_handle;
}
#endif

/* DOCDOC process_handle_new */
@@ -488,8 +488,10 @@ char *tor_join_win_cmdline(const char *argv[]);
int tor_process_get_pid(process_handle_t *process_handle);
#ifdef _WIN32
HANDLE tor_process_get_stdout_pipe(process_handle_t *process_handle);
HANDLE tor_process_get_stderr_pipe(process_handle_t *process_handle);
#else
FILE *tor_process_get_stdout_pipe(process_handle_t *process_handle);
FILE *tor_process_get_stderr_pipe(process_handle_t *process_handle);
#endif

#ifdef _WIN32

0 comments on commit 9b3ef62

Please sign in to comment.