Re: svn commit: r268745 - in head/usr.bin: . timeout

看板FB_svn作者時間11年前 (2014/07/16 19:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/11 (看更多)
--YrQNB5Deg1WGKZi3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > > Author: bapt > > Date: Wed Jul 16 09:55:36 2014 > > New Revision: 268745 > > URL: http://svnweb.freebsd.org/changeset/base/268745 > >=20 > > Log: > > New BSDL timeout(1) utility compatible with GNU timeout > > =20 > > it fully passes the GNU timeout regression tests, it is written in a = mostly > > portable way (only signal parsing is relying on non portable structur= es) > > =20 > > Phabric: D377 > >=20 > > +static sig_atomic_t sig_chld =3D 0; > > +static sig_atomic_t sig_term =3D 0; > > +static sig_atomic_t sig_alrm =3D 0; > > +static sig_atomic_t sig_ign =3D 0; > > + >=20 > No reason to se these explicitely to 0. >=20 > > +static void > > +usage(void) > > +{ > > + fprintf(stderr, "Usage: %s [--signal sig | -s sig] [--preserve-status= ]" > > + " [--kill-after time | -k time] [--foreground] <duration> <comman= d>" > > + " <arg ...>\n", getprogname()); > > + >=20 > Missing newline at the begnning. New line at the beginning? >=20 > > + exit(EX_USAGE); > > +} > > + > > + switch(signo) { > > + case 0: >=20 > sig 0? I doubt it is ever delivered. one of the tests from the GNU testsuite is passing 0 signal >=20 > > + if (timedout && !preserve) > > + pstat =3D EXIT_TIMEOUT; > > + >=20 > Bad indentation. right I'll fix regards, Bapt --YrQNB5Deg1WGKZi3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlPGVSMACgkQ8kTtMUmk6Ey5XQCdFEqvPHJegoXlHyz+edknwxbz 8IgAn1SfQxtFaOhq9AmItPVHKUoSoW77 =Grex -----END PGP SIGNATURE----- --YrQNB5Deg1WGKZi3--
文章代碼(AID): #1Jnbjk5d (FB_svn)
討論串 (同標題文章)
文章代碼(AID): #1Jnbjk5d (FB_svn)