Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 8dd996d4 authored by deuce's avatar deuce

Stop using signals for kernel stuff... sure it's cool, but hijacking

SIGALRM isn't.
parent 1a0312e4
...@@ -193,6 +193,7 @@ tODResult ODKrnlInitialize(void) ...@@ -193,6 +193,7 @@ tODResult ODKrnlInitialize(void)
sigemptyset(&(act.sa_mask)); sigemptyset(&(act.sa_mask));
sigaction(SIGHUP,&act,NULL); sigaction(SIGHUP,&act,NULL);
#ifdef USE_KERNEL_SIGNAL
/* Run kernel on SIGALRM (Every .01 seconds) */ /* Run kernel on SIGALRM (Every .01 seconds) */
act.sa_handler=sig_run_kernel; act.sa_handler=sig_run_kernel;
act.sa_flags=SA_RESTART; act.sa_flags=SA_RESTART;
...@@ -203,6 +204,7 @@ tODResult ODKrnlInitialize(void) ...@@ -203,6 +204,7 @@ tODResult ODKrnlInitialize(void)
itv.it_value.tv_sec=0; itv.it_value.tv_sec=0;
itv.it_value.tv_usec=10000; itv.it_value.tv_usec=10000;
setitimer(ITIMER_REAL,&itv,NULL); setitimer(ITIMER_REAL,&itv,NULL);
#endif
/* Make stdin signal driven. */ /* Make stdin signal driven. */
/* act.sa_handler=sig_get_char; /* act.sa_handler=sig_get_char;
...@@ -220,8 +222,12 @@ tODResult ODKrnlInitialize(void) ...@@ -220,8 +222,12 @@ tODResult ODKrnlInitialize(void)
/* Make sure SIGHUP, SIGALRM, and SIGIO are unblocked */ /* Make sure SIGHUP, SIGALRM, and SIGIO are unblocked */
sigemptyset(&block); sigemptyset(&block);
sigaddset(&block,SIGHUP); sigaddset(&block,SIGHUP);
#ifdef USE_KERNEL_SIGNAL
sigaddset(&block,SIGALRM); sigaddset(&block,SIGALRM);
#endif
#if 0
sigaddset(&block,SIGIO); sigaddset(&block,SIGIO);
#endif
sigprocmask(SIG_UNBLOCK,&block,NULL); sigprocmask(SIG_UNBLOCK,&block,NULL);
#endif #endif
......
...@@ -66,9 +66,13 @@ tODResult ODKrnlStartChatThread(BOOL bTriggeredInternally); ...@@ -66,9 +66,13 @@ tODResult ODKrnlStartChatThread(BOOL bTriggeredInternally);
#define CALL_KERNEL_IF_NEEDED() #define CALL_KERNEL_IF_NEEDED()
#else /* !OD_MULTITHREADED */ #else /* !OD_MULTITHREADED */
#ifdef ODPLAT_NIX #ifdef ODPLAT_NIX
#ifdef USE_KERNEL_SIGNAL
#define CALL_KERNEL_IF_NEEDED() #define CALL_KERNEL_IF_NEEDED()
#else #else
#define CALL_KERNEL_IF_NEEDED() od_kernel() #define CALL_KERNEL_IF_NEEDED() od_kernel()
#endif
#else
#define CALL_KERNEL_IF_NEEDED() od_kernel()
#endif /* !ODPLAT_NIX */ #endif /* !ODPLAT_NIX */
#endif /* !OD_MULTITHREADED */ #endif /* !OD_MULTITHREADED */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment