svn commit: r359596 - head/usr.bin/xargs
Mark Johnston
markj at FreeBSD.org
Fri Apr 3 14:11:08 UTC 2020
Author: markj
Date: Fri Apr 3 14:03:58 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 at alumni.brown.edu
MFC after: 1 week
Modified:
head/usr.bin/xargs/xargs.c
Modified: head/usr.bin/xargs/xargs.c
==============================================================================
--- head/usr.bin/xargs/xargs.c Fri Apr 3 13:57:41 2020 (r359595)
+++ head/usr.bin/xargs/xargs.c Fri Apr 3 14:03:58 2020 (r359596)
@@ -650,7 +650,7 @@ waitchildren(const char *name, int waitall)
if (childerr != 0 && cause_exit == 0) {
errno = childerr;
waitall = 1;
- cause_exit = ENOENT ? 127 : 126;
+ cause_exit = errno == ENOENT ? 127 : 126;
warn("%s", name);
} else if (WIFSIGNALED(status)) {
waitall = cause_exit = 1;
More information about the svn-src-all
mailing list