diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-11-18 21:31:19 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-11-18 21:31:19 +0000 |
commit | d13376ae33be1cf81a86534f42fd78254b0557c4 (patch) | |
tree | b611e7b17fd5f900bac0f3f70a2fc48caf11c9bf /archival | |
parent | 7cbbad2cd2cfe00f2237571bed383f01536ee6aa (diff) | |
download | busybox-w32-d13376ae33be1cf81a86534f42fd78254b0557c4.tar.gz busybox-w32-d13376ae33be1cf81a86534f42fd78254b0557c4.tar.bz2 busybox-w32-d13376ae33be1cf81a86534f42fd78254b0557c4.zip |
Dont close original file handle, we may need it later.
git-svn-id: svn://busybox.net/trunk/busybox@7941 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libunarchive/open_transformer.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c index c1007f982..fb149fc0b 100644 --- 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 | |||
36 | 36 | ||
37 | if (pid == 0) { | 37 | if (pid == 0) { |
38 | /* child process */ | 38 | /* child process */ |
39 | close(fd_pipe[0]); /* We don't wan't to read from the pipe */ | 39 | close(fd_pipe[0]); /* We don't wan't to read from the parent */ |
40 | transformer(src_fd, fd_pipe[1]); | 40 | transformer(src_fd, fd_pipe[1]); |
41 | close(fd_pipe[1]); /* Send EOF */ | 41 | close(fd_pipe[1]); /* Send EOF */ |
42 | close(src_fd); | ||
42 | exit(0); | 43 | exit(0); |
43 | /* notreached */ | 44 | /* notreached */ |
44 | } | 45 | } |
46 | |||
45 | /* parent process */ | 47 | /* parent process */ |
46 | close(fd_pipe[1]); /* Don't want to write down the pipe */ | 48 | close(fd_pipe[1]); /* Don't want to write to the child */ |
47 | close(src_fd); | ||
48 | 49 | ||
49 | return(fd_pipe[0]); | 50 | return(fd_pipe[0]); |
50 | } | 51 | } |