From owner-freebsd-standards@FreeBSD.ORG Wed Feb 15 05:50:10 2012 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B586106566B for ; Wed, 15 Feb 2012 05:50:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 052408FC17 for ; Wed, 15 Feb 2012 05:50:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1F5o937026706 for ; Wed, 15 Feb 2012 05:50:09 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q1F5o9UU026705; Wed, 15 Feb 2012 05:50:09 GMT (envelope-from gnats) Date: Wed, 15 Feb 2012 05:50:09 GMT Message-Id: <201202150550.q1F5o9UU026705@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: Matthew Story Cc: Subject: Re: standards/165155: [PATCH][bin][standards] xargs does not print diagnostic information on utility termination via signal, or utility exit 255 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthew Story List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Feb 2012 05:50:10 -0000 The following reply was made to PR standards/165155; it has been noted by GNATS. From: Matthew Story To: freebsd-gnats-submit@freebsd.org Cc: Subject: Re: standards/165155: [PATCH][bin][standards] xargs does not print diagnostic information on utility termination via signal, or utility exit 255 Date: Wed, 15 Feb 2012 00:42:39 -0500 --bcaec5014bf3f3f9da04b8fa2daa Content-Type: text/plain; charset=ISO-8859-1 On Tue, Feb 14, 2012 at 5:00 PM, Matthew Story wrote: > > >Number: 165155 > [...snip] > Patch attached with submission follows: > > diff -u a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c > --- a/usr.bin/xargs/xargs.c 2012-01-02 22:23:44.000000000 -0500 > +++ b/usr.bin/xargs/xargs.c 2012-02-14 16:39:20.000000000 -0500 > @@ -608,8 +608,11 @@ > * If utility signaled or exited with a value of 255, > * exit 1-125. > */ > - if (WIFSIGNALED(status) || WEXITSTATUS(status) == 255) > - exit(1); > + if (WIFSIGNALED(status)) > + errx(1, "%s: terminated with signal %d, aborting", > + name, WTERMSIG(status)); > + if (WEXITSTATUS(status) == 255) > + errx(1, "%s: exited with status 255, aborting", > name); > if (WEXITSTATUS(status)) > rval = 1; > } > This fix exposes an existing, but hard to reproduce bug ( see: PR 165164: http://www.freebsd.org/cgi/query-pr.cgi?pr=165164 ). The patch from PR 165164 should be applied prior to, on along side this patch, else you will see a lot more: xargs: (null): error diagnostic messages. > > > >Release-Note: > >Audit-Trail: > >Unformatted: > _______________________________________________ > freebsd-standards@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-standards > To unsubscribe, send any mail to " > freebsd-standards-unsubscribe@freebsd.org" > -- regards, matt --bcaec5014bf3f3f9da04b8fa2daa Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, Feb 14, 2012 at 5:00 PM, Matthew Story <matthewstory@gmail.com> w= rote:

>Number: =A0 =A0 =A0 =A0 165155
[...snip]
Patch attached with submission follows:

diff -u a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c
--- a/usr.bin/xargs/xargs.c =A0 =A0 2012-01-02 22:23:44.000000000 -0500
+++ b/usr.bin/xargs/xargs.c =A0 =A0 2012-02-14 16:39:20.000000000 -0500
@@ -608,8 +608,11 @@
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * If utility signaled or exited with a val= ue of 255,
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 * exit 1-125.
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 */
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (WIFSIGNALED(status) || WEXITSTATUS(status= ) =3D=3D 255)
- =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 exit(1);
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (WIFSIGNALED(status))
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errx(1, "%s: terminated = with signal %d, aborting",
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 name, WTERMSI= G(status));
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (WEXITSTATUS(status) =3D=3D 255)
+ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 errx(1, "%s: exited with= status 255, aborting", name);
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (WEXITSTATUS(status))
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0rval =3D 1;
=A0 =A0 =A0 =A0}

This fix exposes an e= xisting, but hard to reproduce bug ( see: PR 165164: http://www.freebsd.org/cgi/query-= pr.cgi?pr=3D165164 ). =A0The patch from PR 165164 should be applied pri= or to, on along side this patch, else you will see a lot more:

xargs: (null): error

diagnosti= c messages.
=A0


>Release-Note:
>Audit-Trail:
>Unformatted:
_______________________________________________
freebsd-standards@freebsd.= org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-standards<= /a>
To unsubscribe, send any mail to "
freebsd-standards-unsubscribe@freebsd.org"= ;



--
regards,
= matt
--bcaec5014bf3f3f9da04b8fa2daa--