summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorDenis Vlasenko2008-06-26 03:26:57 +0000
committerDenis Vlasenko2008-06-26 03:26:57 +0000
commit2649f215aecf923713d2f9a379cf651437ddf499 (patch)
tree267293cd8ebdc2ab8ec6a0663d9a59b4986d6800 /archival
parenta04cc47f1c53c34e81a7271d687d8b68d0489892 (diff)
downloadbusybox-2649f215aecf923713d2f9a379cf651437ddf499.zip
busybox-2649f215aecf923713d2f9a379cf651437ddf499.tar.gz
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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index d0a2b7c..86415c7 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -40,7 +40,8 @@ int open_transformer(int src_fd,
close(fd_pipe.wr); /* Send EOF */
close(src_fd);
}
- exit(EXIT_SUCCESS);
+ /* must be _exit! bug was actually seen here */
+ _exit(EXIT_SUCCESS);
#else
{
char *argv[4];
@@ -60,5 +61,7 @@ int open_transformer(int src_fd,
/* parent process */
close(fd_pipe.wr); /* Don't want to write to the child */
- return fd_pipe.rd;
+//TODO: get rid of return value (become void)?
+ xmove_fd(fd_pipe.rd, src_fd);
+ return src_fd;
}