1 #include "Terminator.h"
2 #include "ace/Log_Msg.h"
3 #include "ace/OS_NS_unistd.h"
6 Terminator::open(void*)
8 if(this->activate (THR_NEW_LWP
| THR_JOINABLE
,
11 ACE_ERROR_RETURN((LM_ERROR
,
12 ACE_TEXT("Terminator::open Error spawning thread %p\n"),
24 ACE_Message_Block
* mb
= 0;
25 if (this->getq(mb
) == -1)
27 ACE_ERROR_RETURN ((LM_ERROR
,
28 "(%P|%t|%T) ERROR: Terminator::svc() could not get "
29 "message block from queue"), -1);
32 if (mb
->msg_type () == ACE_Message_Block::MB_HANGUP
)
37 int delay_secs
= ACE_OS::atoi(mb
->rd_ptr());
39 "(%P|%t|%T) Terminator::svc() Sleeping %d seconds before aborting\n", delay_secs
));
40 ACE_OS::sleep(delay_secs
);