Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Crash_On_Write / Crash_Task.cpp
blobfea99bbb21878828aa093f7da1870010c6897319
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)
12 int
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 ());
21 return 0;