]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Add signal handlers for SIGIO and SIGPOLL
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 20 Nov 2006 21:43:44 +0000 (21:43 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 20 Nov 2006 21:43:44 +0000 (21:43 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3423 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core.c

index 17ac24523ba67b32ad303bd89974c37d0d40a9c9..5509a9b4e8d50f6e76d212137add5c0773da83fc 100644 (file)
@@ -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