aboutsummaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'findutils')
-rw-r--r--findutils/xargs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/findutils/xargs.c b/findutils/xargs.c
index 4399783ea..2ce5634ca 100644
--- a/findutils/xargs.c
+++ b/findutils/xargs.c
@@ -277,14 +277,15 @@ static int xargs_exec(void)
277 status = (errno == ENOENT) ? 127 : 126; 277 status = (errno == ENOENT) ? 127 : 126;
278 } 278 }
279 else if (status >= 0x180) { 279 else if (status >= 0x180) {
280 bb_error_msg("'%s' terminated by signal %d", 280 bb_error_msg("'%s' terminated by signal %u",
281 G.args[0], status - 0x180); 281 G.args[0], status - 0x180);
282 status = 125; 282 status = 125;
283 } 283 }
284 else if (status != 0) { 284 else if (status != 0) {
285 if (status == 255) { 285 if (status == 255) {
286 bb_error_msg("%s: exited with status 255; aborting", G.args[0]); 286 bb_error_msg("%s: exited with status 255; aborting", G.args[0]);
287 return 124; 287 status = 124;
288 goto ret;
288 } 289 }
289 /* "123 if any invocation of the command exited with status 1-125" 290 /* "123 if any invocation of the command exited with status 1-125"
290 * This implies that nonzero exit code is remembered, 291 * This implies that nonzero exit code is remembered,
@@ -293,7 +294,7 @@ static int xargs_exec(void)
293 G.xargs_exitcode = 123; 294 G.xargs_exitcode = 123;
294 status = 0; 295 status = 0;
295 } 296 }
296 297 ret:
297 if (status != 0) 298 if (status != 0)
298 G.xargs_exitcode = status; 299 G.xargs_exitcode = status;
299 return status; 300 return status;