2 #include "Crash_Task.h"
3 #include "ace/OS_NS_unistd.h"
5 Crash_Task::Crash_Task (ACE_Thread_Manager
*thr_mgr
,
6 const ACE_Time_Value
&running_time
)
7 : ACE_Task_Base (thr_mgr
)
8 , running_time_ (running_time
)
13 Crash_Task::svc (void)
15 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Starting crash task\n"));
16 ACE_OS::sleep (this->running_time_
);
17 ACE_DEBUG ((LM_DEBUG
, "(%P|%t) Sleep done, crashing the server\n"));
18 ACE_DEBUG ((LM_DEBUG
, "Aborting\n"));
19 ACE::terminate_process (ACE_OS::getpid ());