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
This commit is contained in:
Denis Vlasenko
2007-09-04 19:33:22 +00:00
parent f0000653e9
commit 7e0fbf9c26
3 changed files with 54 additions and 37 deletions

View File

@@ -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 */
}