]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Remove the FreeSWITCH core handler for SIG_CHLD.
authorWilliam King <william.king@quentustech.com>
Tue, 17 Feb 2015 17:22:34 +0000 (09:22 -0800)
committerWilliam King <william.king@quentustech.com>
Tue, 17 Feb 2015 17:22:34 +0000 (09:22 -0800)
This does not appear to be needed any longer, and while this is in
place a dependent library that tries to start a child process will
hang waiting on the SIG_CHLD signal that the FreeSWITCH core 'ate'.

FS-7250 #resolve

src/switch.c
src/switch_core.c

index 2433535152e966a608934376b37998b04e6fdad3..89a23b75c775d4478354df40be9905cf017bf3a8 100644 (file)
@@ -90,24 +90,6 @@ static void handle_SIGILL(int sig)
        return;
 }
 
-#ifndef WIN32
-
-static void handle_SIGCHLD(int sig)
-{
-       int status = 0;
-       int pid = 0;
-
-       if (sig) {};
-
-       pid = wait(&status);
-       if (pid > 0) {
-               system_ready = -1;
-       }
-
-       return;
-}
-#endif
-
 /* kill a freeswitch process running in background mode */
 static int freeswitch_kill_background()
 {
@@ -1088,8 +1070,6 @@ int main(int argc, char *argv[])
                        fprintf(stderr, "System Error!\n");
                        exit(-1);
                }
-
-               signal(SIGCHLD, handle_SIGCHLD);
        }
 #endif
 
index b2216ec2b5e0c0a88815ec3dd7789f87a981973d..85947c25ca6c9c59ad4a0947a8c1c9ed01047fb3 100644 (file)
@@ -1813,16 +1813,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_init(switch_core_flag_t flags, switc
 }
 
 
-#ifndef WIN32
-static void handle_SIGCHLD(int sig)
-{
-       int status = 0;
-
-       wait(&status);
-       return;
-}
-#endif
-
 #ifdef TRAP_BUS
 static void handle_SIGBUS(int sig)
 {
@@ -2311,13 +2301,6 @@ SWITCH_DECLARE(void) switch_core_set_signal_handlers(void)
 {
        /* set signal handlers */
        signal(SIGINT, SIG_IGN);
-#ifndef WIN32
-       if (switch_test_flag((&runtime), SCF_THREADED_SYSTEM_EXEC)) {
-               signal(SIGCHLD, SIG_DFL);
-       } else {
-               signal(SIGCHLD, handle_SIGCHLD);
-       }
-#endif
 #ifdef SIGPIPE
        signal(SIGPIPE, SIG_IGN);
 #endif