diff --git a/src/odoors/ODKrnl.c b/src/odoors/ODKrnl.c index 5c4c5cf8c650ef28d240663869bdb9988d85ea3f..be8614f0c99fff60d87ace51395d3d35f9c96fe0 100644 --- a/src/odoors/ODKrnl.c +++ b/src/odoors/ODKrnl.c @@ -193,6 +193,7 @@ tODResult ODKrnlInitialize(void) sigemptyset(&(act.sa_mask)); sigaction(SIGHUP,&act,NULL); +#ifdef USE_KERNEL_SIGNAL /* Run kernel on SIGALRM (Every .01 seconds) */ act.sa_handler=sig_run_kernel; act.sa_flags=SA_RESTART; @@ -203,6 +204,7 @@ tODResult ODKrnlInitialize(void) itv.it_value.tv_sec=0; itv.it_value.tv_usec=10000; setitimer(ITIMER_REAL,&itv,NULL); +#endif /* Make stdin signal driven. */ /* act.sa_handler=sig_get_char; @@ -220,8 +222,12 @@ tODResult ODKrnlInitialize(void) /* Make sure SIGHUP, SIGALRM, and SIGIO are unblocked */ sigemptyset(&block); sigaddset(&block,SIGHUP); +#ifdef USE_KERNEL_SIGNAL sigaddset(&block,SIGALRM); +#endif +#if 0 sigaddset(&block,SIGIO); +#endif sigprocmask(SIG_UNBLOCK,&block,NULL); #endif diff --git a/src/odoors/ODKrnl.h b/src/odoors/ODKrnl.h index fb48ef8950fe923dddee3826b494b2815333229b..c94fded1339fa72ba4fbea5db4fe9ae20fbf3a74 100644 --- a/src/odoors/ODKrnl.h +++ b/src/odoors/ODKrnl.h @@ -66,9 +66,13 @@ tODResult ODKrnlStartChatThread(BOOL bTriggeredInternally); #define CALL_KERNEL_IF_NEEDED() #else /* !OD_MULTITHREADED */ #ifdef ODPLAT_NIX +#ifdef USE_KERNEL_SIGNAL #define CALL_KERNEL_IF_NEEDED() #else #define CALL_KERNEL_IF_NEEDED() od_kernel() +#endif +#else +#define CALL_KERNEL_IF_NEEDED() od_kernel() #endif /* !ODPLAT_NIX */ #endif /* !OD_MULTITHREADED */