Subject: Re: syslog_r (Re: CVS commit: src/lib/libc)
To: None <tech-userlevel@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-userlevel
Date: 10/26/2006 18:14:23
On Thu, 26 Oct 2006, Christos Zoulas wrote:
> | > I think that it is useful for a program to be able to syslog()
> | > from an "unsafe" context. What do others think?
> |
> | Even if that's useful, it's better to avoid the name like
> | syslog_r(), because the name implys that its format string is fully
> | compatible with syslog(), but actually it won't be compatible, as
> | Thor said.
>
> The only thing it will be missing is floating point formats and this
> can be noted in the man page. It is not like there are a lot of syslog
> messages that use floating point numbers.

If the use of floating point formats still causes arguments to be
consumed as usual, then I am OK with this.  Even better if something
vaguely sensible is printed, like treating all floating point formats as
if they were %a.  (Oh, we don't support %a.  It's supposed to print in
hex.)

If the use of floating point formats causes bad things to happen, or if
"%f" behaves like "%%f" without consuming any arguments, then I don't
like it.

--apb (Alan Barrett)