From e4862e284832420e9dbf5a6f437f6f7c8801f7dd Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Sun, 24 Feb 2013 10:39:53 +0000 Subject: [PATCH] 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 Change-Id: I0a25a236aadeedf10d3c0c129d716b1397c9a4e3 Reviewed-on: http://gerrit.openafs.org/9245 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot --- src/butc/tcudbprocs.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/butc/tcudbprocs.c b/src/butc/tcudbprocs.c index 5bb0ca148..322c61765 100644 --- a/src/butc/tcudbprocs.c +++ b/src/butc/tcudbprocs.c @@ -493,7 +493,11 @@ writeDbDump(struct butm_tapeInfo *tapeInfoPtr, afs_uint32 taskId, LWP_CreateProcess(KeepAlive, 16384, 1, 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; -- 2.39.5