From owner-svn-src-all@FreeBSD.ORG Wed Jul 16 11:33:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38288A40; Wed, 16 Jul 2014 11:33:16 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE95D2D2E; Wed, 16 Jul 2014 11:33:15 +0000 (UTC) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id s6GBXBCN050403 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jul 2014 14:33:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua s6GBXBCN050403 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id s6GBXBOW050402; Wed, 16 Jul 2014 14:33:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 16 Jul 2014 14:33:11 +0300 From: Konstantin Belousov To: Baptiste Daroussin Subject: Re: svn commit: r268745 - in head/usr.bin: . timeout Message-ID: <20140716113311.GW93733@kib.kiev.ua> References: <201407160955.s6G9taro084054@svn.freebsd.org> <20140716102908.GA17076@dft-labs.eu> <20140716103411.GH48710@ivaldir.etoilebsd.net> <20140716104512.GB17076@dft-labs.eu> <20140716112914.GI48710@ivaldir.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RexYCie7etUZmaVN" Content-Disposition: inline In-Reply-To: <20140716112914.GI48710@ivaldir.etoilebsd.net> User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Mateusz Guzik , src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jul 2014 11:33:16 -0000 --RexYCie7etUZmaVN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 16, 2014 at 01:29:14PM +0200, Baptiste Daroussin wrote: > On Wed, Jul 16, 2014 at 12:45:12PM +0200, Mateusz Guzik wrote: > > On Wed, Jul 16, 2014 at 12:34:11PM +0200, Baptiste Daroussin wrote: > > > On Wed, Jul 16, 2014 at 12:29:08PM +0200, Mateusz Guzik wrote: > > > > On Wed, Jul 16, 2014 at 09:55:36AM +0000, Baptiste Daroussin wrote: > > > > > +static void > > > > > +usage(void) > > > > > +{ > > > > > + fprintf(stderr, "Usage: %s [--signal sig | -s sig] [--preserve-= status]" > > > > > + " [--kill-after time | -k time] [--foreground] <= command>" > > > > > + " \n", getprogname()); > > > > > + > > > >=20 > > > > Missing newline at the begnning. > > > New line at the beginning? > > > >=20 > >=20 > > static void > > usage(void) > > { > >=20 > > fprintf(...); >=20 > Fixed > >=20 > > > > > + exit(EX_USAGE); > > > > > +} > > > > > + > > > > > + switch(signo) { > > > > > + case 0: > > > >=20 > > > > sig 0? I doubt it is ever delivered. > > >=20 > > > one of the tests from the GNU testsuite is passing 0 signal > >=20 > > I even checked. The kernel is not going to deliver signal 0, so checking > > for it in signal handler does not seem to make sense. > >=20 > > Does the testcaes fail without it or something? > >=20 >=20 > Yes the test fails without it Which test ? Kernel never delivers signal 0. There were some bugs in libthr which caused some signals to be reported as signal 0, they are supposedly fixed. The kill(0, pid) is defined as testing for the pid existence, but the target process is not interrupted. --RexYCie7etUZmaVN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTxmL2AAoJEJDCuSvBvK1BMs0P/RYSAmzR2XVoRWfSClo2DG4Y /z0LKo9BLcyt87pkb8X0lDNojyxCPIQNdK2YbToH4eZMoMKnFZ9I0kXWzQPChMQh /6sGUXYGgTR6jdsTJGm0/iTq/+jAxL1oV3q2bKBNey0osbOdyRAxkQcjIwQx/oJj 9aN4Ll4FprjfHKl3k0gEnODX+y6qBMKCZXqbcc36uit9qQH9zC3+hTxpFEXchhON bdGCEdOnyUK6a/P6P09sKcb4CHg38PhQWUy6yOxnq3S+g/T460dxB8D11jEYEcLK hQZBrMjRh2ViyEL849U71aUpWNWP8jex+YJDDK9z3BIlej7hGPueQjQrS273E6lc uW0/sxstV2ROfC43+i181qALpCEbZjcqWG5wgZWGdagYiq5ZJd6Fx9Rizgb/+z3k w2FRpqviub7pKql7zIzHGqthYQ59S7oh/6ZXrS+CcZdYv93Lo/5sIS/taOsA2LsO /Gh7vhJFb8WoorYpcYSVeIYCbyTXzCB/FyKu4XMYLpEgMFY2AQcoFoLkO1D+il/z azU8lQqei1n03ov8L6F1uol2KcWrqRTyvbvDSrSqG/WmFgURyb5KHZZa/bfkvrIN WY5fqDqKFhvhfACPyRM1f+eaTmzDgK8zIJhfBg6qTgOPqzKgv8QhEnCOubbbpWvo QaA/7ESODYDv3ygukQ4i =hk40 -----END PGP SIGNATURE----- --RexYCie7etUZmaVN--