From: Martin Mares Date: Mon, 16 Feb 2009 21:45:09 +0000 (+0100) Subject: Logging: Mention closing logfiles before exec in the docs. X-Git-Tag: holmes-import~71 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=2ef1656793bb6e85835e0be7a5045d0473023b60;p=libucw.git Logging: Mention closing logfiles before exec in the docs. --- diff --git a/ucw/doc/log.txt b/ucw/doc/log.txt index ded657f4..a24a50dd 100644 --- a/ucw/doc/log.txt +++ b/ucw/doc/log.txt @@ -93,7 +93,9 @@ Processes, threads and signals ------------------------------ When you fork a new process, it automatically inherits all currently configured log streams. You should however call <> to update the logger's notion -of the current PID (at least when you use PID's in your log messages). +of the current PID (at least when you use PID's in your log messages). Also, if you +plan to exec() a process after fork(), do not forget to call <>, +so that all file descriptors used for log files (except for stderr) are closed. The <> function itself can be called from multiple threads in parallel and it is atomic by design. The functions for setting up the logging machinery