summaryrefslogtreecommitdiff
path: root/archival/libunarchive/open_transformer.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-14 02:23:43 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-14 02:23:43 +0000
commitea62077b850076c4d7dc3cf78ebd1888928c6ddf (patch)
tree37b7584ae40b99edb5583fbc4392b62ffdadf278 /archival/libunarchive/open_transformer.c
parent88ca06769028e442bf873b270c176ca0e9f021f8 (diff)
downloadbusybox-w32-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.tar.gz
busybox-w32-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.tar.bz2
busybox-w32-ea62077b850076c4d7dc3cf78ebd1888928c6ddf.zip
add open_read_close() and similar stuff
Diffstat (limited to 'archival/libunarchive/open_transformer.c')
-rw-r--r--archival/libunarchive/open_transformer.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index 99e71ec2e..456d3e986 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -18,23 +18,23 @@ int open_transformer(int src_fd,
18 int pid; 18 int pid;
19 19
20 if (pipe(fd_pipe) != 0) { 20 if (pipe(fd_pipe) != 0) {
21 bb_perror_msg_and_die("Can't create pipe"); 21 bb_perror_msg_and_die("can't create pipe");
22 } 22 }
23 23
24 pid = fork(); 24 pid = fork();
25 if (pid == -1) { 25 if (pid == -1) {
26 bb_perror_msg_and_die("Fork failed"); 26 bb_perror_msg_and_die("fork failed");
27 } 27 }
28 28
29 if (pid == 0) { 29 if (pid == 0) {
30 /* child process */ 30 /* child process */
31 close(fd_pipe[0]); /* We don't wan't to read from the parent */ 31 close(fd_pipe[0]); /* We don't wan't to read from the parent */
32 // FIXME: error check? 32 // FIXME: error check?
33 transformer(src_fd, fd_pipe[1]); 33 transformer(src_fd, fd_pipe[1]);
34 close(fd_pipe[1]); /* Send EOF */ 34 close(fd_pipe[1]); /* Send EOF */
35 close(src_fd); 35 close(src_fd);
36 exit(0); 36 exit(0);
37 /* notreached */ 37 /* notreached */
38 } 38 }
39 39
40 /* parent process */ 40 /* parent process */