On 7/8/26 10:10, James Youngman wrote:
On Tue, Jul 7, 2026 at 8:15 AM Bernhard Voelker
Therefore, the documentation fix would be:
- 125 if any invocation of the command exited with status 1-125
+ 125 if any invocation of the command exited with status 1-254
WDYT?
Another patch in the sequence addresses the problem you mentioned.
hmm, did I miss a patch? I don't see a fix for that line pushed.
The pushed series shows the correct command exit code mapping to 125
in the new POSIX EXIT STATUS REQUIREMENTS subsection, that's nice.
For the wrong line in the section EXIT STATUS I suggest the attached patch.
WDYT?
Have a nice day,
Berny
From 9407b3578383e26be4f31fe5cec28f0e9ef07f28 Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <[email protected]>
Date: Wed, 8 Jul 2026 23:24:08 +0200
Subject: [PATCH] doc: further clarify the exit status of xargs
* doc/find.texi (Invoking xargs): Clarify that xargs only exits with 0
if all of the command invocations succeeded.
For xargs exit code 123, fix the range of the exit codes of the invoked
command from 1-125 to 1-254.
Add a sentence clarifying that xargs terminates as soon as possible when
it exits with status 125-128.
* xargs/xargs.1 (EXIT STATUS): Likewise.
---
doc/find.texi | 7 +++++--
xargs/xargs.1 | 8 ++++++--
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/doc/find.texi b/doc/find.texi
index 4868a17d..b336e592 100644
--- a/doc/find.texi
+++ b/doc/find.texi
@@ -3981,9 +3981,9 @@ standard input.
@table @asis
@item 0
-if it succeeds
+if all invocations of the command succeeded and exited with status 0
@item 123
-if any invocation of the command exited with status 1-125
+if any invocation of the command exited with status 1-254.
@item 124
if the command exited with status 255
@item 125
@@ -3996,6 +3996,9 @@ if the command is not found
if some other error occurred.
@end table
+In the cases of the @code{xargs} exit codes 125, 126, 127 and 128, the tool
+terminates as soon as possible, and does therefore not process any further
+input.
The commands run by @code{xargs} are not invoked via the shell. The
shell's @math{128 + n} convention for reporting that a process had
diff --git a/xargs/xargs.1 b/xargs/xargs.1
index e140581f..78613091 100644
--- a/xargs/xargs.1
+++ b/xargs/xargs.1
@@ -540,9 +540,9 @@ Generates a compact listing of all the users on the system.
exits with the following status:
.RS
.IP 0
-if it succeeds
+if all invocations of the command succeeded and exited with status 0
.IP 123
-if any invocation of the command exited with status 1\*(en125
+if any invocation of the command exited with status 1\*(en254
.IP 124
if the command exited with status 255
.IP 125
@@ -556,6 +556,10 @@ if some other error occurred.
.RE
.
.P
+In the cases of the xargs exit codes 125, 126, 127 and 128, the tool terminates
+as soon as possible, and does therefore not process any further input.
+.
+.P
The commands run by
.B xargs
are not invoked via the shell.
--
2.54.0