projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b9fc8f
)
Dont close original file handle, we may need it later.
author
Glenn L McGrath
<bug1@ihug.co.nz>
Tue, 18 Nov 2003 21:31:19 +0000
(21:31 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Tue, 18 Nov 2003 21:31:19 +0000
(21:31 -0000)
archival/libunarchive/open_transformer.c
patch
|
blob
|
history
diff --git
a/archival/libunarchive/open_transformer.c
b/archival/libunarchive/open_transformer.c
index c1007f98213c72ba52fbb2ee782b6cc586209f70..fb149fc0b18b3fdb3b94b22b0dca28e59cab9f03 100644
(file)
--- a/
archival/libunarchive/open_transformer.c
+++ b/
archival/libunarchive/open_transformer.c
@@
-36,15
+36,16
@@
extern int open_transformer(int src_fd, int (*transformer)(int src_fd, int dst_f
if (pid == 0) {
/* child process */
- close(fd_pipe[0]); /* We don't wan't to read from the p
ipe
*/
+ close(fd_pipe[0]); /* We don't wan't to read from the p
arent
*/
transformer(src_fd, fd_pipe[1]);
close(fd_pipe[1]); /* Send EOF */
+ close(src_fd);
exit(0);
/* notreached */
}
+
/* parent process */
- close(fd_pipe[1]); /* Don't want to write down the pipe */
- close(src_fd);
+ close(fd_pipe[1]); /* Don't want to write to the child */
return(fd_pipe[0]);
}