summaryrefslogtreecommitdiff
path: root/ACE
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2009-05-14 10:11:28 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2009-05-14 10:11:28 +0000
commit46699b049a2c0a84478c0b4635413af7d83e4448 (patch)
tree3635d2e9436cc610218346227ec7276f89abf3dc /ACE
parentb0cc709d4327d3b0a1f264d9f5d77e2a7cf1a5aa (diff)
downloadATCD-46699b049a2c0a84478c0b4635413af7d83e4448.tar.gz
Thu May 14 10:10:05 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/Network_Adapters_Test.cpp: Only register signal handlers for SIGINT, SIGQUIT and SIGTERM when they are not equal zero * tests/Process_Manager_Test.cpp: Const changes, prefix increment/decrement
Diffstat (limited to 'ACE')
-rw-r--r--ACE/ChangeLog9
-rw-r--r--ACE/tests/Network_Adapters_Test.cpp8
-rw-r--r--ACE/tests/Process_Manager_Test.cpp10
3 files changed, 20 insertions, 7 deletions
diff --git a/ACE/ChangeLog b/ACE/ChangeLog
index 4bbae6b1b87..e3b20d1b0d0 100644
--- a/ACE/ChangeLog
+++ b/ACE/ChangeLog
@@ -1,3 +1,12 @@
+Thu May 14 10:10:05 2009 Johnny Willemsen <jwillemsen@remedy.nl>
+
+ * tests/Network_Adapters_Test.cpp:
+ Only register signal handlers for SIGINT, SIGQUIT and SIGTERM when
+ they are not equal zero
+
+ * tests/Process_Manager_Test.cpp:
+ Const changes, prefix increment/decrement
+
Thu May 14 07:17:05 2009 Johnny Willemsen <jwillemsen@remedy.nl>
* tests/DLL_Test.cpp:
diff --git a/ACE/tests/Network_Adapters_Test.cpp b/ACE/tests/Network_Adapters_Test.cpp
index 9301a312278..d58f93b9abe 100644
--- a/ACE/tests/Network_Adapters_Test.cpp
+++ b/ACE/tests/Network_Adapters_Test.cpp
@@ -564,25 +564,29 @@ int
Stop_Handler::open (void)
{
// Register the signal handler object to catch the signals.
+#if (SIGINT != 0)
if (this->reactor ()->register_handler (SIGINT, this) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) Stop_Handler::open: %p <%d>\n"),
ACE_TEXT ("register_handler for SIGINT"), SIGINT),
-1);
+#endif /* SIGINT != 0 */
+#if (SIGTERM != 0)
if (this->reactor ()->register_handler (SIGTERM, this) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) Stop_Handler::open: %p <%d>\n"),
ACE_TEXT ("register_handler for SIGTERM"), SIGTERM),
-1);
+#endif /* SIGTERM != 0 */
-#if ! defined (ACE_WIN32)
+#if (SIGQUIT != 0)
if (this->reactor ()->register_handler (SIGQUIT, this) == -1)
ACE_ERROR_RETURN ((LM_ERROR,
ACE_TEXT ("(%P|%t) Stop_Handler::open: %p <%d>\n"),
ACE_TEXT ("register_handler for SIGQUIT"), SIGQUIT),
-1);
-#endif /* #if ! defined (ACE_WIN32) */
+#endif /* SIGQUIT != 0 */
return 0;
}
diff --git a/ACE/tests/Process_Manager_Test.cpp b/ACE/tests/Process_Manager_Test.cpp
index 339daa3d8eb..164fa9102be 100644
--- a/ACE/tests/Process_Manager_Test.cpp
+++ b/ACE/tests/Process_Manager_Test.cpp
@@ -177,7 +177,7 @@ public:
{
char tmp[10];
order += ACE_OS::itoa (sleep_time_, tmp, 10);
- running_tasks++;
+ ++running_tasks;
activate ();
return 0;
}
@@ -216,7 +216,7 @@ public:
int close (u_long)
// FUZZ: enable check_for_lack_ACE_OS
{
- running_tasks--;
+ --running_tasks;
return 0;
}
@@ -296,11 +296,11 @@ run_main (int argc, ACE_TCHAR *argv[])
{
// child process: sleep & exit
ACE_TCHAR lognm[MAXPATHLEN];
- int mypid (ACE_OS::getpid ());
+ int const mypid (ACE_OS::getpid ());
ACE_OS::sprintf(lognm, ACE_TEXT ("Process_Manager_Test-child-%d"), mypid);
ACE_START_TEST (lognm);
- int secs = ACE_OS::atoi (argv[get_opt.opt_ind ()]);
+ int const secs = ACE_OS::atoi (argv[get_opt.opt_ind ()]);
ACE_OS::sleep (secs ? secs : 1);
ACE_TCHAR prio[64];
@@ -583,7 +583,7 @@ run_main (int argc, ACE_TCHAR *argv[])
ACE_DEBUG ((LM_DEBUG,
ACE_TEXT ("(%P) Reactor loop done!\n") ));
- size_t nr_procs = mgr.managed ();
+ size_t const nr_procs = mgr.managed ();
if (nr_procs != 0)
ACE_ERROR ((LM_ERROR,
ACE_TEXT ("(%P) %d processes left in manager\n"),