ENH: Added more error state checks to RunSingleCommand.

This commit is contained in:
Brad King 2004-01-15 08:50:37 -05:00
parent 09b766ef14
commit 79a1734269
1 changed files with 10 additions and 0 deletions

View File

@ -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) else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Error)
{ {
std::cerr << cmsysProcess_GetErrorString(cp) << "\n"; std::cerr << cmsysProcess_GetErrorString(cp) << "\n";
result = false; result = false;
} }
else if(cmsysProcess_GetState(cp) == cmsysProcess_State_Expired)
{
std::cerr << "Process terminated due to timeout\n";
result = false;
}
cmsysProcess_Delete(cp); cmsysProcess_Delete(cp);