aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/filter_fork_posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/filter_fork_posix.c')
-rw-r--r--libarchive/filter_fork_posix.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libarchive/filter_fork_posix.c b/libarchive/filter_fork_posix.c
index 02dbd4bb4362..ac255c4f8b20 100644
--- a/libarchive/filter_fork_posix.c
+++ b/libarchive/filter_fork_posix.c
@@ -72,8 +72,9 @@ __FBSDID("$FreeBSD: head/lib/libarchive/filter_fork.c 182958 2008-09-12 05:33:00
#include "filter_fork.h"
-pid_t
-__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout)
+int
+__archive_create_child(const char *cmd, int *child_stdin, int *child_stdout,
+ pid_t *out_child)
{
pid_t child;
int stdin_pipe[2], stdout_pipe[2], tmp;
@@ -177,7 +178,8 @@ __archive_create_child(const char *cmd, int *child_stdin, int *child_stdout)
fcntl(*child_stdout, F_SETFL, O_NONBLOCK);
__archive_cmdline_free(cmdline);
- return child;
+ *out_child = child;
+ return ARCHIVE_OK;
#if HAVE_POSIX_SPAWNP
actions_inited:
@@ -192,7 +194,7 @@ stdin_opened:
close(stdin_pipe[1]);
state_allocated:
__archive_cmdline_free(cmdline);
- return -1;
+ return ARCHIVE_FAILED;
}
void