Cleanup RunCOmmand code and move borland one to vtkWin32ProcessExecution, so that it is all in one place... Add timeout option whihc does not work yet, but it should not produce warning any more

This commit is contained in:
Andy Cedilnik
2002-10-04 10:38:14 -04:00
parent 38d1ea9b4c
commit 0f3661562c
4 changed files with 345 additions and 292 deletions
+8 -3
View File
@@ -270,11 +270,16 @@ public:
*
* If verbose is false, no user-viewable output from the program
* being run will be generated.
*
* If timeout is specified, the command will be terminated after
* timeout expires.
*/
static bool RunCommand(const char* command, std::string& output, const char* directory = 0,
bool verbose = true);
static bool RunCommand(const char* command, std::string& output,
const char* directory = 0,
bool verbose = true, int timeout = 0);
static bool RunCommand(const char* command, std::string& output,
int &retVal, const char* directory = 0, bool verbose = true);
int &retVal, const char* directory = 0,
bool verbose = true, int timeout = 0);
///! for windows return the short path for the given path, unix just a pass through
static bool GetShortPath(const char* path, std::string& result);