From 7e0fbf9c26350a819661241bc925cb88f26bb992 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 4 Sep 2007 19:33:22 +0000 Subject: 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 --- archival/libunarchive/open_transformer.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'archival/libunarchive/open_transformer.c') 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 */ } -- cgit v1.2.3