Subject: Re: snprintf_ss (Re: CVS commit: src/include)
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Christos Zoulas <christos@zoulas.com>
List: tech-userlevel
Date: 10/28/2006 10:40:49
On Oct 28,  3:50pm, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
-- Subject: Re: snprintf_ss (Re: CVS commit: src/include)

| > 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.

I think that was the last one.

| anyway, i don't think trying to make stdio signal safe is a good idea.

Neither do I. I am just trying to make vsnprintf() signal safe, and it
has not proven easy.

christos