diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-08-30 12:27:36 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2003-08-30 12:27:36 +0000 |
commit | 2efffb40cb68c099bbedaf75080dbedd717e5a41 (patch) | |
tree | 80feac0dcf04b687e944a7b1966fb7dcd96fcb1d /libbb | |
parent | 793a161c7a06b0339c7be3c0335f1fb7b33b1685 (diff) | |
download | busybox-w32-2efffb40cb68c099bbedaf75080dbedd717e5a41.tar.gz busybox-w32-2efffb40cb68c099bbedaf75080dbedd717e5a41.tar.bz2 busybox-w32-2efffb40cb68c099bbedaf75080dbedd717e5a41.zip |
The default behaviour for run-parts is corrected to continue if an error
is encountered in a script.
Patch by Philip Blundell
git-svn-id: svn://busybox.net/trunk/busybox@7309 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/run_parts.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbb/run_parts.c b/libbb/run_parts.c index 171d93793..0eb766086 100644 --- a/libbb/run_parts.c +++ b/libbb/run_parts.c | |||
@@ -80,7 +80,7 @@ extern int run_parts(char **args, const unsigned char test_mode, char **env) | |||
80 | bb_perror_msg_and_die("failed to stat component %s", filename); | 80 | bb_perror_msg_and_die("failed to stat component %s", filename); |
81 | } | 81 | } |
82 | if (S_ISREG(st.st_mode) && !access(filename, X_OK)) { | 82 | if (S_ISREG(st.st_mode) && !access(filename, X_OK)) { |
83 | if (test_mode & 1) { | 83 | if (test_mode) { |
84 | puts(filename); | 84 | puts(filename); |
85 | } else { | 85 | } else { |
86 | /* exec_errno is common vfork variable */ | 86 | /* exec_errno is common vfork variable */ |
@@ -100,7 +100,8 @@ extern int run_parts(char **args, const unsigned char test_mode, char **env) | |||
100 | waitpid(pid, &result, 0); | 100 | waitpid(pid, &result, 0); |
101 | if(exec_errno) { | 101 | if(exec_errno) { |
102 | errno = exec_errno; | 102 | errno = exec_errno; |
103 | bb_perror_msg_and_die("failed to exec %s", filename); | 103 | bb_perror_msg("failed to exec %s", filename); |
104 | exitstatus = 1; | ||
104 | } | 105 | } |
105 | if (WIFEXITED(result) && WEXITSTATUS(result)) { | 106 | if (WIFEXITED(result) && WEXITSTATUS(result)) { |
106 | bb_perror_msg("%s exited with return code %d", filename, WEXITSTATUS(result)); | 107 | bb_perror_msg("%s exited with return code %d", filename, WEXITSTATUS(result)); |