diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-26 03:26:57 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-26 03:26:57 +0000 |
commit | 2649f215aecf923713d2f9a379cf651437ddf499 (patch) | |
tree | 267293cd8ebdc2ab8ec6a0663d9a59b4986d6800 /archival | |
parent | a04cc47f1c53c34e81a7271d687d8b68d0489892 (diff) | |
download | busybox-w32-2649f215aecf923713d2f9a379cf651437ddf499.tar.gz busybox-w32-2649f215aecf923713d2f9a379cf651437ddf499.tar.bz2 busybox-w32-2649f215aecf923713d2f9a379cf651437ddf499.zip |
open_transformer: fix bug of calling exit instead of _exit
open_transformer: don't leak compressed descriptor anymore
recursive_action: tiny shrink
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libunarchive/open_transformer.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c index d0a2b7c36..86415c749 100644 --- a/archival/libunarchive/open_transformer.c +++ b/archival/libunarchive/open_transformer.c | |||
@@ -40,7 +40,8 @@ int open_transformer(int src_fd, | |||
40 | close(fd_pipe.wr); /* Send EOF */ | 40 | close(fd_pipe.wr); /* Send EOF */ |
41 | close(src_fd); | 41 | close(src_fd); |
42 | } | 42 | } |
43 | exit(EXIT_SUCCESS); | 43 | /* must be _exit! bug was actually seen here */ |
44 | _exit(EXIT_SUCCESS); | ||
44 | #else | 45 | #else |
45 | { | 46 | { |
46 | char *argv[4]; | 47 | char *argv[4]; |
@@ -60,5 +61,7 @@ int open_transformer(int src_fd, | |||
60 | /* parent process */ | 61 | /* parent process */ |
61 | close(fd_pipe.wr); /* Don't want to write to the child */ | 62 | close(fd_pipe.wr); /* Don't want to write to the child */ |
62 | 63 | ||
63 | return fd_pipe.rd; | 64 | //TODO: get rid of return value (become void)? |
65 | xmove_fd(fd_pipe.rd, src_fd); | ||
66 | return src_fd; | ||
64 | } | 67 | } |