Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2015 17:55:05 +0200
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        Bryan Drewery <bdrewery@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r289879 - head/usr.sbin/newsyslog
Message-ID:  <20151024155505.GA39162@stack.nl>
In-Reply-To: <20151024153946.GD40371@ivaldir.etoilebsd.net>
References:  <201510241355.t9ODtCnp039885@repo.freebsd.org> <562BA43A.50806@FreeBSD.org> <20151024153946.GD40371@ivaldir.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Oct 24, 2015 at 05:39:47PM +0200, Baptiste Daroussin wrote:
> On Sat, Oct 24, 2015 at 08:31:06AM -0700, Bryan Drewery wrote:
> > On 10/24/15 6:55 AM, Baptiste Daroussin wrote:
> > > +static int
> > > +parse_signal(const char *str)

> > Maybe this and the timeout(1) version should move to libc or libutil. We
> > do have strsignal(3) and psignal(3) too.

> I was thinking about moving parse_signal to libutil yes.

There is similar code in sh(1) (for trap) and kill(1). In either case,
"0", "00", etc. are valid, unlike in timeout(1) and newsyslog(8). In
kill(1)'s case, the error messages are more detailed.

I'm not going to add a dependency on libutil in such basic utilities
though. In my humble opinion, depending on another DSO is more expensive
than having a small piece of duplicated code.

-- 
Jilles Tjoelker



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20151024155505.GA39162>