From: Simon Wilkinson Date: Sun, 24 Feb 2013 10:39:53 +0000 (+0000) Subject: butc: Catch failures to start keep alive thread X-Git-Tag: upstream/1.6.3^2~91 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=489bb387a35f14ae94ba73ec395f51c5bdfd0b7a;p=packages%2Fo%2Fopenafs.git butc: Catch failures to start keep alive thread If we can't start the keep alive thread, in either the LWP or pthread versions of a code, report an error and exit instead of carrying on regardless. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9245 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e4862e284832420e9dbf5a6f437f6f7c8801f7dd) Change-Id: I55453557b592bb1814877d291b1604907ab2e8d6 Reviewed-on: http://gerrit.openafs.org/9535 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand --- diff --git a/src/butc/tcudbprocs.c b/src/butc/tcudbprocs.c index a31652dba..bab5b8858 100644 --- a/src/butc/tcudbprocs.c +++ b/src/butc/tcudbprocs.c @@ -511,7 +511,11 @@ writeDbDump(struct butm_tapeInfo *tapeInfoPtr, afs_uint32 taskId, LWP_CreateProcess(KeepAlive, 16384, 1, (void *)NULL, "Keep-alive process", &alivePid); #endif - /* XXX should we check code here ??? XXX */ + if (code) { + ErrorLog(0, taskId, code, 0, + "Failed to create keep alive process\n"); + ERROR_EXIT(code); + } } firstcall = 0;