diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-21 21:56:07 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-04-21 21:56:07 +0000 |
commit | 5a07a1d255da10214ddd3cb8dda75bfbfdf46e4c (patch) | |
tree | 93a19f2009e6acf058b12de4036208f055cede0f /archival/libunarchive | |
parent | a4a93fdf1851cbde59c8766cba8f7830df8fe5d7 (diff) |
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.c | 8 |
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, #if BB_MMU pid = fork(); + if (pid == -1) + bb_perror_msg_and_die("can't fork"); #else pid = vfork(); -#endif if (pid == -1) - bb_perror_msg_and_die("fork failed"); + bb_perror_msg_and_die("can't vfork"); +#endif if (pid == 0) { /* child process */ @@ -49,7 +51,7 @@ int open_transformer(int src_fd, argv[2] = (char*)"-"; argv[3] = NULL; BB_EXECVP(transform_prog, argv); - bb_perror_msg_and_die("exec failed"); + bb_perror_msg_and_die("can't exec %s", transform_prog); } #endif /* notreached */ |