From b2bc13dc7ea601e417b0bb218e22b58763ea77d5 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 20 Nov 2006 21:43:44 +0000 Subject: [PATCH] Add signal handlers for SIGIO and SIGPOLL git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3423 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/switch_core.c b/src/switch_core.c index 17ac24523b..5509a9b4e8 100644 --- a/src/switch_core.c +++ b/src/switch_core.c @@ -3999,6 +3999,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(char *console, const char **err runtime.initiated = switch_time_now(); return SWITCH_STATUS_SUCCESS; } + #ifdef SIGPIPE static void handle_SIGPIPE(int sig) { @@ -4007,6 +4008,25 @@ static void handle_SIGPIPE(int sig) return; } #endif + +#ifdef SIGPOLL +static void handle_SIGPOLL(int sig) +{ + if(sig); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig Poll!\n"); + return; +} +#endif + +#ifdef SIGIO +static void handle_SIGIO(int sig) +{ + if(sig); + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "Sig I/O!\n"); + return; +} +#endif + #ifdef TRAP_BUS static void handle_SIGBUS(int sig) { @@ -4033,6 +4053,12 @@ SWITCH_DECLARE(switch_status_t) switch_core_init_and_modload(char *console, cons #ifdef SIGPIPE signal(SIGPIPE, handle_SIGPIPE); #endif +#ifdef SIGPOLL + signal(SIGPIPE, handle_SIGPOLL); +#endif +#ifdef SIGIO + signal(SIGPIPE, handle_SIGIO); +#endif #ifdef TRAP_BUS signal(SIGBUS, handle_SIGBUS); #endif