Reorder bosserver startup prior to pthreads
authorBen Kaduk <kaduk@mit.edu>
Mon, 29 Jul 2013 18:22:46 +0000 (14:22 -0400)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 8 Oct 2013 12:51:07 +0000 (05:51 -0700)
commit0b1ee8c1c359fe16693bf117524f54160ebe53e3
tree30c98121721fc7a8644b7b99f303cbf9e2062627
parent54eb2485b59550ba42569ed3a8d76211a3a35019
Reorder bosserver startup prior to pthreads

The rx calls will take locks when built in pthreaded mode, and must go
after rx_Init().  Some other setup would benefit from using time-domain
locking and should run before we go multithreaded.

In particular, initialize bozo_confdir while single-threaded, as it is
otherwise protected by the afsconf internal locking.  While here, pass
NULL to afsconf_SetCellInfo -- bozo_confdir would always be NULL there,
anyway.

Change a couple globals into local variables in main; they are just
used to defer setup after argument parsing.

ReadBozoFile will create worker threads to monitor child processes,
so it cannot move up too far.

Change when we daemonize, too.

Change-Id: If7b6883748919270c9a5a41cd8e6fb724e95aa36
Reviewed-on: http://gerrit.openafs.org/10285
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/bozo/bosserver.c