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:
8392acd
)
Close unused pipe handle before fork (for tar -z).
author
Glenn L McGrath
<bug1@ihug.co.nz>
Sat, 20 Jan 2001 00:12:21 +0000
(
00:12
-0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Sat, 20 Jan 2001 00:12:21 +0000
(
00:12
-0000)
archival/tar.c
patch
|
blob
|
history
tar.c
patch
|
blob
|
history
diff --git
a/archival/tar.c
b/archival/tar.c
index 844559580faf031c872663f64b27ebdf4f6c850b..49e99a1a5a4740cd98bbe8ee10d1c89b91511d4f 100644
(file)
--- a/
archival/tar.c
+++ b/
archival/tar.c
@@
-169,13
+169,16
@@
extern int tar_unzip_init(int tarFd)
if (child_pid==0) {
/* child process */
+ close(unzip_pipe[0]);
gunzip_init();
unzip(tarFd, unzip_pipe[1]);
exit(EXIT_SUCCESS);
}
- else
+ else
{
/* return fd of uncompressed data to parent process */
+ close(unzip_pipe[1]);
return(unzip_pipe[0]);
+ }
}
#endif
diff --git
a/tar.c
b/tar.c
index 844559580faf031c872663f64b27ebdf4f6c850b..49e99a1a5a4740cd98bbe8ee10d1c89b91511d4f 100644
(file)
--- a/
tar.c
+++ b/
tar.c
@@
-169,13
+169,16
@@
extern int tar_unzip_init(int tarFd)
if (child_pid==0) {
/* child process */
+ close(unzip_pipe[0]);
gunzip_init();
unzip(tarFd, unzip_pipe[1]);
exit(EXIT_SUCCESS);
}
- else
+ else
{
/* return fd of uncompressed data to parent process */
+ close(unzip_pipe[1]);
return(unzip_pipe[0]);
+ }
}
#endif