summaryrefslogtreecommitdiff
path: root/archival/libarchive/data_extract_to_command.c
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-01 22:12:44 +0200
committerDenys Vlasenko2016-04-01 22:12:44 +0200
commitc4199f22d0f7793b70db51c01783f0d45afce3d4 (patch)
treed54b8df23749d5ea06dc5effd5ba111b8e2cf52f /archival/libarchive/data_extract_to_command.c
parent29b33b63d49be88200f794d832450a4c71e85a5e (diff)
downloadbusybox-c4199f22d0f7793b70db51c01783f0d45afce3d4.zip
busybox-c4199f22d0f7793b70db51c01783f0d45afce3d4.tar.gz
libbb: two new functions: wait_for_exitstatus(pid), xfchdir(fd)
Bartosz Golaszewski proposed xfchdir() Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive/data_extract_to_command.c')
-rw-r--r--archival/libarchive/data_extract_to_command.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/archival/libarchive/data_extract_to_command.c b/archival/libarchive/data_extract_to_command.c
index 6f5317a..5d87693 100644
--- a/archival/libarchive/data_extract_to_command.c
+++ b/archival/libarchive/data_extract_to_command.c
@@ -112,8 +112,7 @@ void FAST_FUNC data_extract_to_command(archive_handle_t *archive_handle)
bb_copyfd_exact_size(archive_handle->src_fd, p[1], -file_header->size);
close(p[1]);
- if (safe_waitpid(pid, &status, 0) == -1)
- bb_perror_msg_and_die("waitpid");
+ status = wait_for_exitstatus(pid);
if (WIFEXITED(status) && WEXITSTATUS(status))
bb_error_msg_and_die("'%s' returned status %d",
archive_handle->tar__to_command, WEXITSTATUS(status));