childpipe_write = NULL;
childpipe_read_fd = -1;
}
- if (NULL != pipe_stdout)
+ if (NULL != pipe_stdin)
{
GNUNET_assert (GNUNET_OK ==
GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle
- (pipe_stdout,
- GNUNET_DISK_PIPE_END_WRITE),
- &fd_stdout_write, sizeof (int)));
+ (pipe_stdin, GNUNET_DISK_PIPE_END_READ),
+ &fd_stdin_read, sizeof (int)));
GNUNET_assert (GNUNET_OK ==
GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle
- (pipe_stdout, GNUNET_DISK_PIPE_END_READ),
- &fd_stdout_read, sizeof (int)));
+ (pipe_stdin, GNUNET_DISK_PIPE_END_WRITE),
+ &fd_stdin_write, sizeof (int)));
}
- if (NULL != pipe_stdin)
+ if (NULL != pipe_stdout)
{
GNUNET_assert (GNUNET_OK ==
GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle
- (pipe_stdin, GNUNET_DISK_PIPE_END_READ),
- &fd_stdin_read, sizeof (int)));
+ (pipe_stdout,
+ GNUNET_DISK_PIPE_END_WRITE),
+ &fd_stdout_write, sizeof (int)));
GNUNET_assert (GNUNET_OK ==
GNUNET_DISK_internal_file_handle_ (GNUNET_DISK_pipe_handle
- (pipe_stdin, GNUNET_DISK_PIPE_END_WRITE),
- &fd_stdin_write, sizeof (int)));
+ (pipe_stdout, GNUNET_DISK_PIPE_END_READ),
+ &fd_stdout_read, sizeof (int)));
}
if (NULL != pipe_stderr)
{
}
-
-
/**
* Start a process.
*
* @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
* @param pipe_stdin pipe to use to send input to child process (or NULL)
* @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get output from child process (or NULL)
* @param filename name of the binary
* @param argv NULL-terminated array of arguments to the process
* @return pointer to process structure of the new process, NULL on error
* @param std_inheritance a set of GNUNET_OS_INHERIT_STD_* flags
* @param pipe_stdin pipe to use to send input to child process (or NULL)
* @param pipe_stdout pipe to use to get output from child process (or NULL)
+ * @param pipe_stderr pipe to use to get output from child process (or NULL)
* @param filename name of the binary
* @param va NULL-terminated list of arguments to the process
* @return pointer to process structure of the new process, NULL on error