bosserver: Catch failures to create daemon thread

If we can't create the bozo daemon thread, then don't keep going
regardless. Just warn the user and exit.

Caught by coverity (#988414)

Reviewed-on: http://gerrit.openafs.org/9269
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 4587ddc130)

Change-Id: I4dcf67f4aeb2533ad39e9b1b0202d00205584118
Reviewed-on: http://gerrit.openafs.org/11011
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
This commit is contained in:
Simon Wilkinson 2013-02-26 12:06:15 +00:00 committed by Stephan Wiesand
parent 5b0d0785ef
commit d5d8de1455

View File

@ -1121,6 +1121,10 @@ main(int argc, char **argv, char **envp)
code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1, code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1,
/* param */ NULL , "bozo-the-clown", /* param */ NULL , "bozo-the-clown",
&bozo_pid); &bozo_pid);
if (code) {
bozo_Log("Failed to create daemon thread\n");
exit(1);
}
/* try to read the key from the config file */ /* try to read the key from the config file */
tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH); tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);