Re: [dev] Attempt at a suckless syslog

From: Zack Breckenridge <zbrdge_AT_gmail.com>
Date: Fri, 18 Jul 2014 06:16:41 -0700

Weldon,

I think this is pretty interesting, though I'd have to compare some
other implementations of syslogd to actually be able to tell you what
functionality is missing that I "can't live without". The code is nice
and short though.

> ... It currently uses
> daemon(3) to detach, but I'm open to an argument that your daemon
> manager should do that instead. (My toy distro doesn't have a daemon
> manager yet.)

Funny, I was just reading about daemon(3) on the toybox mailing list
yesterday [0], where the discussion was mostly centered around the
issue of where daemon(3) is available. Perhaps this touches upon your
decision of "code architecture": if you switch your libc for your
distro, does using daemon(3) directly in your code mean you have to
fix it if it's not available? At any rate, it looks like it's nearly
everywhere except OS X. I think this is an interesting question for
any suckless distribution (and I'm sure it's been discussed here
before) -- how small can you make the daemon manager?

Regarding line 91-92 of logwd.c:

> if ((severity > 7) || (severity < 0)) { severity = 8; }
> /* Sue me. I'm paranoid. I'm aware of how this "can't happen"... */

Of course you never know... Is it possible to make severity and
facility unsigned integers?

Interesting stuff, thanks for sharing!

- Zack

[0]: http://lists.landley.net/pipermail/toybox-landley.net/2014-July/003527.html
Received on Fri Jul 18 2014 - 15:16:41 CEST

This archive was generated by hypermail 2.3.0 : Fri Jul 18 2014 - 15:24:07 CEST