[BusyBox-cvs] busybox/archival/libunarchive open_transformer.c, 1.1, 1.2
Glenn McGrath
bug1 at busybox.net
Tue Nov 18 21:31:24 UTC 2003
Update of /var/cvs/busybox/archival/libunarchive
In directory winder:/tmp/cvs-serv18725/archival/libunarchive
Modified Files:
open_transformer.c
Log Message:
Dont close original file handle, we may need it later.
Index: open_transformer.c
===================================================================
RCS file: /var/cvs/busybox/archival/libunarchive/open_transformer.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- open_transformer.c 15 Nov 2003 23:19:02 -0000 1.1
+++ open_transformer.c 18 Nov 2003 21:31:19 -0000 1.2
@@ -36,15 +36,16 @@
if (pid == 0) {
/* child process */
- close(fd_pipe[0]); /* We don't wan't to read from the pipe */
+ close(fd_pipe[0]); /* We don't wan't to read from the parent */
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]);
}
More information about the busybox-cvs
mailing list