aboutsummaryrefslogtreecommitdiff
path: root/archival/libunarchive
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-04-21 21:56:07 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-04-21 21:56:07 +0000
commit5a07a1d255da10214ddd3cb8dda75bfbfdf46e4c (patch)
tree93a19f2009e6acf058b12de4036208f055cede0f /archival/libunarchive
parenta4a93fdf1851cbde59c8766cba8f7830df8fe5d7 (diff)
downloadbusybox-w32-5a07a1d255da10214ddd3cb8dda75bfbfdf46e4c.tar.gz
busybox-w32-5a07a1d255da10214ddd3cb8dda75bfbfdf46e4c.tar.bz2
busybox-w32-5a07a1d255da10214ddd3cb8dda75bfbfdf46e4c.zip
tar: move vfork into separate function (smaller code)
open_transformer: more informative error messages function old new delta vfork_compressor - 210 +210 writeTarFile 547 299 -248 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 210/-248) Total: -38 bytes
Diffstat (limited to 'archival/libunarchive')
-rw-r--r--archival/libunarchive/open_transformer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/archival/libunarchive/open_transformer.c b/archival/libunarchive/open_transformer.c
index 3c551de06..8fb860234 100644
--- a/archival/libunarchive/open_transformer.c
+++ b/archival/libunarchive/open_transformer.c
@@ -22,11 +22,13 @@ int open_transformer(int src_fd,
22 22
23#if BB_MMU 23#if BB_MMU
24 pid = fork(); 24 pid = fork();
25 if (pid == -1)
26 bb_perror_msg_and_die("can't fork");
25#else 27#else
26 pid = vfork(); 28 pid = vfork();
27#endif
28 if (pid == -1) 29 if (pid == -1)
29 bb_perror_msg_and_die("fork failed"); 30 bb_perror_msg_and_die("can't vfork");
31#endif
30 32
31 if (pid == 0) { 33 if (pid == 0) {
32 /* child process */ 34 /* child process */
@@ -49,7 +51,7 @@ int open_transformer(int src_fd,
49 argv[2] = (char*)"-"; 51 argv[2] = (char*)"-";
50 argv[3] = NULL; 52 argv[3] = NULL;
51 BB_EXECVP(transform_prog, argv); 53 BB_EXECVP(transform_prog, argv);
52 bb_perror_msg_and_die("exec failed"); 54 bb_perror_msg_and_die("can't exec %s", transform_prog);
53 } 55 }
54#endif 56#endif
55 /* notreached */ 57 /* notreached */