diff options
author | Kurt Zenker <kz@openoffice.org> | 2009-11-13 19:13:08 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2009-11-13 19:13:08 +0100 |
commit | f9e98c2a8916e4003ed2014b88202cac0aad8a84 (patch) | |
tree | e87384248b716fb462ff852761890cc1dcda64ef | |
parent | 6ff0116714daf6fb06c9eacaa5d79524ca5dc623 (diff) | |
parent | c1942c7468e9c13cb057ee5a7959760a5b999819 (diff) |
CWS-TOOLING: integrate CWS cmcfixes65
Notes
split repo tag: testing_ooo/DEV300_m65
-rw-r--r-- | testshl2/source/dynamicregister.cxx | 6 | ||||
-rw-r--r-- | testshl2/source/terminate.cxx | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/testshl2/source/dynamicregister.cxx b/testshl2/source/dynamicregister.cxx index 02fb05871303..801e7702ab65 100644 --- a/testshl2/source/dynamicregister.cxx +++ b/testshl2/source/dynamicregister.cxx @@ -46,14 +46,14 @@ namespace fixes { - void changedir(const char* _sPath) + int changedir(const char* _sPath) { #if defined(WIN32) // chdir(_sPath) is marked depricated since Visual C++ 2005 // use _chdir instead - ::_chdir(_sPath); + return ::_chdir(_sPath); #else - ::chdir(_sPath); + return ::chdir(_sPath); #endif } } diff --git a/testshl2/source/terminate.cxx b/testshl2/source/terminate.cxx index 3db99d55d43a..b2dc95b0e860 100644 --- a/testshl2/source/terminate.cxx +++ b/testshl2/source/terminate.cxx @@ -116,7 +116,13 @@ int ProcessHandler::readPIDFromFile() // exit(0); } // if file exist, wait short, maybe the other tool writes it down. - fscanf(in, "%d", &nPID); + if (fscanf(in, "%d", &nPID) != 1) + { + // fprintf(stderr, "warning: (testshl.cxx) can't read own pid.\n"); + fclose(in); + return 0; + // exit(0); + } fclose(in); } else |