Subject: Re: snprintf_ss (Re: CVS commit: src/include)
To: None <christos@zoulas.com>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-userlevel
Date: 10/28/2006 15:50:17
> On Oct 28, 2:26pm, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
> -- Subject: snprintf_ss (Re: CVS commit: src/include)
>
> | > Module Name: src
> | > Committed By: christos
> | > Date: Fri Oct 27 20:03:21 UTC 2006
> | >
> | > Modified Files:
> | > src/include: stdio.h
> | >
> | > Log Message:
> | > - flags should be unsigned short instead of short.
> | > - add __SAFE flag, to indicate that we want async-signal-safe functionality
> | > only.
> | > - add snprintf_ss, and vsnprintf_ss; these are undocumented on purpose.
> |
> | please don't use locale stuffs like localeconv from signal handlers.
> |
> | i'd suggest to have a minimal, dedicated logging function,
> | rather than trying to make syslog and stdio signal safe.
>
> What locale stuff?
as i said above, for example, localeconv. it's used by __vfprintf_unlocked.
i don't know if there are others.
anyway, i don't think trying to make stdio signal safe is a good idea.
YAMAMOTO Takashi