Add comment about serverlog locking 23/12123/6
authorBenjamin Kaduk <kaduk@mit.edu>
Thu, 3 Dec 2015 04:56:57 +0000 (22:56 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Mon, 25 Apr 2016 04:09:19 +0000 (00:09 -0400)
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 <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/util/serverLog.c

index 04ab263..5cb0879 100644 (file)
@@ -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