本文整理汇总了C++中ACE_Sig_Set::empty_set方法的典型用法代码示例。如果您正苦于以下问题:C++ ACE_Sig_Set::empty_set方法的具体用法?C++ ACE_Sig_Set::empty_set怎么用?C++ ACE_Sig_Set::empty_set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ACE_Sig_Set
的用法示例。
在下文中一共展示了ACE_Sig_Set::empty_set方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: do_initializeSignals
void
do_initializeSignals (bool allowUserRuntimeConnect_in,
ACE_Sig_Set& signals_inout)
{
RPG_TRACE(ACE_TEXT("::do_initializeSignals"));
int result = -1;
// init return value(s)
result = signals_inout.empty_set ();
if (result == -1)
{
ACE_DEBUG ((LM_ERROR,
ACE_TEXT ("failed to ACE_Sig_Set::empty_set(): \"%m\", aborting\n")));
return;
} // end IF
// init list of handled signals...
// *PORTABILITY*: on Windows SIGHUP and SIGQUIT are not defined,
// so we handle SIGBREAK (21) and SIGABRT (22) instead...
#if !defined (ACE_WIN32) && !defined (ACE_WIN64)
// *NOTE*: don't handle SIGHUP !!!! --> program will hang !
//signals_inout.push_back(SIGHUP);
#endif
signals_inout.sig_add (SIGINT);
#if !defined (ACE_WIN32) && !defined (ACE_WIN64)
signals_inout.sig_add (SIGQUIT);
#endif
// signals_inout.sig_add(SIGILL);
// signals_inout.sig_add(SIGTRAP);
// signals_inout.sig_add(SIGBUS);
// signals_inout.sig_add(SIGFPE);
// signals_inout.sig_add(SIGKILL); // cannot catch this one...
if (allowUserRuntimeConnect_in)
#if !defined (ACE_WIN32) && !defined (ACE_WIN64)
signals_inout.sig_add (SIGUSR1);
#else
signals_inout.sig_add (SIGBREAK);
#endif
// signals_inout.sig_add(SIGSEGV);
if (allowUserRuntimeConnect_in)
#if !defined (ACE_WIN32) && !defined (ACE_WIN64)
signals_inout.sig_add (SIGUSR2);
#else
signals_inout.sig_add (SIGABRT);
#endif
// signals_inout.sig_add(SIGPIPE);
// signals_inout.sig_add(SIGALRM);
signals_inout.sig_add (SIGTERM);
// signals_inout.sig_add(SIGSTKFLT);
// signals_inout.sig_add(SIGCHLD);
// signals_inout.sig_add(SIGCONT);
// signals_inout.sig_add(SIGSTOP); // cannot catch this one...
// signals_inout.sig_add(SIGTSTP);
// signals_inout.sig_add(SIGTTIN);
// signals_inout.sig_add(SIGTTOU);
// signals_inout.sig_add(SIGURG);
// signals_inout.sig_add(SIGXCPU);
// signals_inout.sig_add(SIGXFSZ);
// signals_inout.sig_add(SIGVTALRM);
// signals_inout.sig_add(SIGPROF);
// signals_inout.sig_add(SIGWINCH);
// signals_inout.sig_add(SIGIO);
// signals_inout.sig_add(SIGPWR);
// signals_inout.sig_add(SIGSYS);
// signals_inout.sig_add(SIGRTMIN);
// signals_inout.sig_add(SIGRTMIN+1);
// ...
// signals_inout.sig_add(SIGRTMAX-1);
// signals_inout.sig_add(SIGRTMAX);
}