From d860a4beaf5f99d5045d03b931b4829426a2f7b0 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Tue, 14 Sep 2010 15:56:31 +0400 Subject: extra: implemented module 'pppd_compat' which starts pppd compatible scripts ip-up, ip-down, and newly introduced - ip-change, when radius CoA request received, also this module manages pppd compatible radattr.pppX files core: implemented module 'sigchld' which handles SIGCHLD signal, waits child processes to terminate and manages pid terminate handlers --- accel-pptpd/triton/triton.c | 11 +++++++++++ accel-pptpd/triton/triton.h | 7 +++++++ 2 files changed, 18 insertions(+) (limited to 'accel-pptpd/triton') diff --git a/accel-pptpd/triton/triton.c b/accel-pptpd/triton/triton.c index b0aedbc..9b9fd75 100644 --- a/accel-pptpd/triton/triton.c +++ b/accel-pptpd/triton/triton.c @@ -35,6 +35,17 @@ static void* triton_thread(struct _triton_thread_t *thread) sigset_t set; int sig; + sigfillset(&set); + pthread_sigmask(SIG_BLOCK, &set, NULL); + + sigdelset(&set, SIGUSR1); + sigdelset(&set, SIGQUIT); + sigdelset(&set, SIGSEGV); + sigdelset(&set, SIGFPE); + sigdelset(&set, SIGILL); + sigdelset(&set, SIGBUS); + pthread_sigmask(SIG_UNBLOCK, &set, NULL); + sigemptyset(&set); sigaddset(&set, SIGUSR1); sigaddset(&set, SIGQUIT); diff --git a/accel-pptpd/triton/triton.h b/accel-pptpd/triton/triton.h index b1df497..8510a51 100644 --- a/accel-pptpd/triton/triton.h +++ b/accel-pptpd/triton/triton.h @@ -29,6 +29,13 @@ struct triton_timer_t void (*expire)(struct triton_timer_t *); }; +struct triton_sigchld_handler_t +{ + void *tpd; + int pid; + void (*handler)(struct triton_sigchld_handler_t *h, int status); +}; + struct conf_option_t { struct list_head entry; -- cgit v1.2.3