From d5d8de145551c7afaf2aa488712901b2b9c18678 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 26 Feb 2013 12:06:15 +0000 Subject: [PATCH] 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 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 4587ddc130547b4cce723476cfa798a03ccc0320) Change-Id: I4dcf67f4aeb2533ad39e9b1b0202d00205584118 Reviewed-on: http://gerrit.openafs.org/11011 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand --- src/bozo/bosserver.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bozo/bosserver.c b/src/bozo/bosserver.c index de3e49155d..6277c8ac2a 100644 --- a/src/bozo/bosserver.c +++ b/src/bozo/bosserver.c @@ -1121,6 +1121,10 @@ main(int argc, char **argv, char **envp) code = LWP_CreateProcess(BozoDaemon, BOZO_LWP_STACKSIZE, /* priority */ 1, /* param */ NULL , "bozo-the-clown", &bozo_pid); + if (code) { + bozo_Log("Failed to create daemon thread\n"); + exit(1); + } /* try to read the key from the config file */ tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);