[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: snprintf(3) and friends async-signal safety?
On Wed, 22 Dec 2010 16:46:02 +0000 (UTC), christos%astron.com@localhost (Christos
Question is: is it really safe to use it in a signal handler inside
It is not and this is why we have vsnprintf_ss() but that does not
floating point formats.
That is not portable I guess -- and I don't see many executables using
Now that I have raised that point, should I fix dd(1) to:
- use snprintf_ss() functions,
- use a volatile sig_atomic_t and put a call to summary() in the input
loop (that will cause delay to output, but it also fixes asynchronous
access when reading statistics)
- leave it as-is (don't care)
Main Index |
Thread Index |