In usr.bin/xargs/xargs.c, line 653: cause_exit = ENOENT ? 127 : 126; No variable is compared to ENOENT, so it always returns 127. This should likely be: cause_exit = errno == ENOENT ? 127 : 126;
A commit references this bug: Author: markj Date: Fri Apr 3 14:03:59 UTC 2020 New revision: 359596 URL: https://svnweb.freebsd.org/changeset/base/359596 Log: xargs: Fix exit status expression when a child process fails to exec. PR: 244327 Submitted by: thomas.duffy.99@alumni.brown.edu MFC after: 1 week Changes: head/usr.bin/xargs/xargs.c
Looks good to me.
A commit references this bug: Author: markj Date: Fri Apr 10 01:37:00 UTC 2020 New revision: 359768 URL: https://svnweb.freebsd.org/changeset/base/359768 Log: MFC r359596: xargs: Fix exit status expression when a child process fails to exec. PR: 244327 Changes: _U stable/12/ stable/12/usr.bin/xargs/xargs.c
Thanks for the patch.