aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive/open_transformer.c
diff options
context:
space:
mode:
authorGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-09-04 19:33:22 +0000
committerGravatar Denis Vlasenko <vda.linux@googlemail.com>2007-09-04 19:33:22 +0000
commit7e0fbf9c26350a819661241bc925cb88f26bb992 (patch)
tree827570e004a3af086963154f0379b662fd0a3ea5 /archival/libunarchive/open_transformer.c
parentf0000653e90fdbddcd49adb69909ab60c88feda5 (diff)
downloadbusybox-7e0fbf9c26350a819661241bc925cb88f26bb992.tar.gz
busybox-7e0fbf9c26350a819661241bc925cb88f26bb992.tar.bz2
tar: conditionally don't wait for vforked child to exec, as it always
works right on Linux, and anyway mayresult only on less-than-clear error message only, it will not cause tar to misbehave. function old new delta open_transformer 98 80 -18 writeTarFile 714 547 -167 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-185) Total: -185 bytes text data bss dec hex filename 770651 1051 10764 782466 bf082 busybox_old 770463 1051 10764 782278 befc6 busybox_unstripped
Diffstat (limited to 'archival/libunarchive/open_transformer.c')
-rw-r--r--archival/libunarchive/open_transformer.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index 0ee080621..93f01be6f 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -25,8 +25,10 @@ int open_transformer(int src_fd,
close(fd_pipe[0]); /* We don't wan't to read from the parent */
// FIXME: error check?
transformer(src_fd, fd_pipe[1]);
- close(fd_pipe[1]); /* Send EOF */
- close(src_fd);
+ if (ENABLE_FEATURE_CLEAN_UP) {
+ close(fd_pipe[1]); /* Send EOF */
+ close(src_fd);
+ }
exit(0);
/* notreached */
}