Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Apr 2020 01:37:00 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r359768 - stable/12/usr.bin/xargs
Message-ID:  <202004100137.03A1b0oG056495@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Fri Apr 10 01:37:00 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

Modified:
  stable/12/usr.bin/xargs/xargs.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/usr.bin/xargs/xargs.c
==============================================================================
--- stable/12/usr.bin/xargs/xargs.c	Fri Apr 10 01:28:47 2020	(r359767)
+++ stable/12/usr.bin/xargs/xargs.c	Fri Apr 10 01:37:00 2020	(r359768)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202004100137.03A1b0oG056495>