]> mj.ucw.cz Git - libucw.git/commit
Logging: L_SIGHANDLER should be really safe.
authorMartin Mares <mj@ucw.cz>
Fri, 20 Feb 2009 15:54:09 +0000 (16:54 +0100)
committerMartin Mares <mj@ucw.cz>
Fri, 20 Feb 2009 15:54:09 +0000 (16:54 +0100)
commit8458dd2f239313e763dda98c8ded6e46f3f63ea4
tree81a25a7c50bfda0c8e117a3ec0344dcd3cb6617a
parent369e3caec4caee65ae4c16d5c04b0f43a50a3150
Logging: L_SIGHANDLER should be really safe.

I have realized that many operations performed by the log stream code are
either unsafe to call from signal handlers, subject to races between the
main program and its signal handlers, or subject to deadlocks when the
ucwlib_lock is taken.

I have therefore changed the semantics of L_SIGHANDLER to provide only
the minimal logging service: All sighandler messages are now logged to
stderr (which usually follows the main log file) and they are limited
to 255 characters (so that no dynamic allocation is performed).
ucw/doc/log.txt
ucw/log.c