diff options
-rw-r--r-- | findutils/xargs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c index c369bdaf5..0dedb6356 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c | |||
@@ -204,14 +204,15 @@ static int xargs_exec(void) | |||
204 | status = (errno == ENOENT) ? 127 : 126; | 204 | status = (errno == ENOENT) ? 127 : 126; |
205 | } | 205 | } |
206 | else if (status >= 0x180) { | 206 | else if (status >= 0x180) { |
207 | bb_error_msg("'%s' terminated by signal %d", | 207 | bb_error_msg("'%s' terminated by signal %u", |
208 | G.args[0], status - 0x180); | 208 | G.args[0], status - 0x180); |
209 | status = 125; | 209 | status = 125; |
210 | } | 210 | } |
211 | else if (status != 0) { | 211 | else if (status != 0) { |
212 | if (status == 255) { | 212 | if (status == 255) { |
213 | bb_error_msg("%s: exited with status 255; aborting", G.args[0]); | 213 | bb_error_msg("%s: exited with status 255; aborting", G.args[0]); |
214 | return 124; | 214 | status = 124; |
215 | goto ret; | ||
215 | } | 216 | } |
216 | /* "123 if any invocation of the command exited with status 1-125" | 217 | /* "123 if any invocation of the command exited with status 1-125" |
217 | * This implies that nonzero exit code is remembered, | 218 | * This implies that nonzero exit code is remembered, |
@@ -220,7 +221,7 @@ static int xargs_exec(void) | |||
220 | G.xargs_exitcode = 123; | 221 | G.xargs_exitcode = 123; |
221 | status = 0; | 222 | status = 0; |
222 | } | 223 | } |
223 | 224 | ret: | |
224 | if (status != 0) | 225 | if (status != 0) |
225 | G.xargs_exitcode = status; | 226 | G.xargs_exitcode = status; |
226 | return status; | 227 | return status; |