From 4bfb874d19135e1e5dfe96edbba8e8968cae32b0 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Wed, 2 Dec 2015 22:56:57 -0600 Subject: [PATCH] Add comment about serverlog locking The lock protects global state such as the logging FD and the syslog-related variables. Change-Id: I5ea1b6945c10047da14d35b948a6a0ea53b55add Reviewed-on: https://gerrit.openafs.org/12123 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- src/util/serverLog.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util/serverLog.c b/src/util/serverLog.c index 04ab263d3e..5cb08791bd 100644 --- a/src/util/serverLog.c +++ b/src/util/serverLog.c @@ -62,6 +62,8 @@ dummyThreadNum(void) } static int (*threadNumProgram) (void) = dummyThreadNum; +/* After single-threaded startup, accesses to serverlogFD and + * serverLogSyslog* are protected by LOCK_SERVERLOG(). */ static int serverLogFD = -1; #ifndef AFS_NT40_ENV