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 | a45ceb935d1a203f9de145daaa16b601905aba21 (patch) | |
tree | d377e669cf36b8147891d3358f29d2ffc437149b | |
parent | 16a4843454026f763fa26d6014fdc44d3a6ee676 (diff) | |
parent | 1c7e4aef4fddf9fcce63e29835d4d5ec76844e91 (diff) |
CWS-TOOLING: integrate CWS cmcfixes65ooo/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 95af83dfe..d7d1042c5 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 2c85bcc60..cb7fd4121 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 |