svn commit: r268745 - in head/usr.bin: . timeout
Baptiste Daroussin
bapt at FreeBSD.org
Wed Jul 16 10:34:20 UTC 2014
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
> >
> > Log:
> > New BSDL timeout(1) utility compatible with GNU timeout
> >
> > it fully passes the GNU timeout regression tests, it is written in a mostly
> > portable way (only signal parsing is relying on non portable structures)
> >
> > Phabric: D377
> >
> > +static sig_atomic_t sig_chld = 0;
> > +static sig_atomic_t sig_term = 0;
> > +static sig_atomic_t sig_alrm = 0;
> > +static sig_atomic_t sig_ign = 0;
> > +
>
> No reason to se these explicitely to 0.
>
> > +static void
> > +usage(void)
> > +{
> > + fprintf(stderr, "Usage: %s [--signal sig | -s sig] [--preserve-status]"
> > + " [--kill-after time | -k time] [--foreground] <duration> <command>"
> > + " <arg ...>\n", getprogname());
> > +
>
> Missing newline at the begnning.
New line at the beginning?
>
> > + exit(EX_USAGE);
> > +}
> > +
> > + switch(signo) {
> > + case 0:
>
> sig 0? I doubt it is ever delivered.
one of the tests from the GNU testsuite is passing 0 signal
>
> > + if (timedout && !preserve)
> > + pstat = EXIT_TIMEOUT;
> > +
>
> Bad indentation.
right I'll fix
regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20140716/249c10db/attachment.sig>
More information about the svn-src-all
mailing list