1 #include "ace/OS_NS_signal.h"
2 #include "ace/OS_NS_Thread.h"
3 #include "ace/Thread.h"
9 #include "jaws3/Signal_Task.h"
10 #include "jaws3/Event_Dispatcher.h"
11 #include "jaws3/THYBRID_Concurrency.h"
12 #include "jaws3/TPOOL_Concurrency.h"
13 #include "jaws3/TPR_Concurrency.h"
17 JAWS_Signal_Task_function (void *)
23 int signo
= ACE_OS::sigwait (JAWS_Signal_Task::instance ()->sigset ());
30 JAWS_Concurrency::instance ()->shutdown ();
31 JAWS_Event_Dispatcher::end_event_loop ();
36 # if !defined (ACE_WIN32)
38 // In the future, re-read jaws.conf and svc.conf,
39 // and then reset the JAWS singletons.
40 // For now, just ignore it.
44 #endif // !defined (ACE_WIN32)
55 JAWS_Signal_Task::JAWS_Signal_Task ()
57 // Set our signal mask.
58 this->sigset_
.empty_set ();
60 this->sigset_
.sig_add (SIGINT
);
61 this->sigset_
.sig_add (SIGTERM
);
62 this->sigset_
.sig_add (SIGPIPE
);
65 this->sigset_
.fill_set ();
68 ACE_OS::sigprocmask (SIG_BLOCK
, this->sigset_
, 0);
71 result
= ACE_Thread::spawn ( JAWS_Signal_Task_function
77 ACE_ERROR ((LM_ERROR
, "%p\n", "ACE_Thread::spawn"));