summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-11-13 19:13:08 +0100
committerKurt Zenker <kz@openoffice.org>2009-11-13 19:13:08 +0100
commita45ceb935d1a203f9de145daaa16b601905aba21 (patch)
treed377e669cf36b8147891d3358f29d2ffc437149b
parent16a4843454026f763fa26d6014fdc44d3a6ee676 (diff)
parent1c7e4aef4fddf9fcce63e29835d4d5ec76844e91 (diff)
CWS-TOOLING: integrate CWS cmcfixes65ooo/DEV300_m65
-rw-r--r--testshl2/source/dynamicregister.cxx6
-rw-r--r--testshl2/source/terminate.cxx8
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