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

Konstantin Belousov kostikbel at gmail.com
Wed Jul 16 11:33:16 UTC 2014


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] <duration> <command>"
> > > > > +	    " <arg ...>\n", getprogname());
> > > > > +
> > > > 
> > > > Missing newline at the begnning.
> > > New line at the beginning?
> > > > 
> > 
> > static void
> > usage(void)
> > {
> > 
> > 	fprintf(...);
> 
> Fixed
> > 
> > > > > +	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
> > 
> > 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.
> > 
> > Does the testcaes fail without it or something?
> > 
> 
> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20140716/33b76b82/attachment.sig>


More information about the svn-src-all mailing list