From 2ef1656793bb6e85835e0be7a5045d0473023b60 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Mon, 16 Feb 2009 22:45:09 +0100 Subject: [PATCH] Logging: Mention closing logfiles before exec in the docs. --- ucw/doc/log.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.2