svn commit: r289879 - head/usr.sbin/newsyslog

Jilles Tjoelker jilles at stack.nl
Sat Oct 24 15:55:09 UTC 2015


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


More information about the svn-src-all mailing list