From 79a1734269d7cc919c20e11699ef8ace31e0db83 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 15 Jan 2004 08:50:37 -0500 Subject: ENH: Added more error state checks to RunSingleCommand. --- Source/cmSystemTools.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 87a33a0..c36529b 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -469,11 +469,21 @@ bool cmSystemTools::RunSingleCommand( } } } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Exception) + { + std::cerr << cmsysProcess_GetExceptionString(cp) << "\n"; + result = false; + } else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error) { std::cerr << cmsysProcess_GetErrorString(cp) << "\n"; result = false; } + else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Expired) + { + std::cerr << "Process terminated due to timeout\n"; + result = false; + } cmsysProcess_Delete(cp); -- cgit v0.12