- fix cli arg parse
[oweals/gnunet.git] / src / util / os_priority.c
index d0c5123630450b1ced3260d75cde89d426d5adf9..d3310abb175463c9e58fb3deca0651de37fa90f5 100644 (file)
@@ -563,28 +563,28 @@ start_process (int pipe_control,
     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)
   {
@@ -1225,8 +1225,6 @@ start_process (int pipe_control,
 }
 
 
-
-
 /**
  * Start a process.
  *
@@ -1234,6 +1232,7 @@ start_process (int pipe_control,
  * @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
@@ -1265,6 +1264,7 @@ GNUNET_OS_start_process_vap (int pipe_control,
  * @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