aboutsummaryrefslogtreecommitdiff
path: root/archival/libarchive/open_transformer.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2013-11-19 14:44:04 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2013-11-19 14:44:04 +0100
commitebfa9b5aa1f1f6cd4949e1be03ebf1ce074727d1 (patch)
treee6a939e4d8b145ae0208f078a24ae89d9b7da629 /archival/libarchive/open_transformer.c
parent8b59b2c13ededb2c82e36193b6d6e969df36531c (diff)
downloadbusybox-ebfa9b5aa1f1f6cd4949e1be03ebf1ce074727d1.tar.gz
tar: fix exitcode check for MMU-spawned unpacking helpers
Testcase: tar xvzf EMPTY_FILE function old new delta open_transformer 102 106 +4 get_header_tar 1781 1785 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive/open_transformer.c')
-rw-r--r--archival/libarchive/open_transformer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c
index 4e44a87e9..4e9826441 100644
--- a/archival/libarchive/open_transformer.c
+++ b/archival/libarchive/open_transformer.c
@@ -79,16 +79,17 @@ void FAST_FUNC open_transformer(int fd, const char *transform_prog)
// FIXME: error check?
#if BB_MMU
{
+ IF_DESKTOP(long long) int r;
transformer_aux_data_t aux;
init_transformer_aux_data(&aux);
aux.check_signature = check_signature;
- transformer(&aux, fd, fd_pipe.wr);
+ r = transformer(&aux, fd, fd_pipe.wr);
if (ENABLE_FEATURE_CLEAN_UP) {
close(fd_pipe.wr); /* send EOF */
close(fd);
}
/* must be _exit! bug was actually seen here */
- _exit(EXIT_SUCCESS);
+ _exit(/*error if:*/ r < 0);
}
#else
{