diff --git a/trick_source/sim_services/Executive/Executive_init_signal_handlers.cpp b/trick_source/sim_services/Executive/Executive_init_signal_handlers.cpp index 8302d1f3..a7ae1298 100644 --- a/trick_source/sim_services/Executive/Executive_init_signal_handlers.cpp +++ b/trick_source/sim_services/Executive/Executive_init_signal_handlers.cpp @@ -175,12 +175,12 @@ int Trick::Executive::init_signal_handlers() { static struct sigaction sigact; - /* By default catch SIGBUS, SIGSEGV, SIGABRT, and SIGCHLD. Don't catch SIGFPE */ + /* By default catch SIGBUS, SIGSEGV, SIGABRT. Don't catch SIGFPE, SIGCHLD */ set_trap_sigbus(true) ; set_trap_sigfpe(false) ; set_trap_sigsegv(true) ; set_trap_sigabrt(true) ; - set_trap_sigchld(true) ; + set_trap_sigchld(false) ; /* Assign ctrl_c_hand() as the default signal handler for SIGINT ( keypress). */ sigact.sa_handler = (void (*)(int)) ctrl_c_hand; diff --git a/trick_source/sim_services/Executive/test/Executive_test.cpp b/trick_source/sim_services/Executive/test/Executive_test.cpp index 78e0726b..a4a2e775 100644 --- a/trick_source/sim_services/Executive/test/Executive_test.cpp +++ b/trick_source/sim_services/Executive/test/Executive_test.cpp @@ -796,18 +796,19 @@ TEST_F(ExecutiveTest , SetSignalHandlers) { EXPECT_TRUE( sigact.sa_handler == sig_hand ) ; sigaction(SIGSEGV, NULL , &sigact) ; EXPECT_TRUE( sigact.sa_handler == sig_hand ) ; - sigaction(SIGCHLD, NULL , &sigact) ; - EXPECT_TRUE( sigact.sa_handler == child_handler ) ; sigaction(SIGFPE, NULL , &sigact) ; EXPECT_TRUE( sigact.sa_handler == SIG_DFL ) ; exec.set_trap_sigbus(1) ; exec.set_trap_sigsegv(1) ; exec.set_trap_sigfpe(1) ; + exec.set_trap_sigchld(1) ; sigaction(SIGBUS, NULL , &sigact) ; EXPECT_TRUE( sigact.sa_handler == sig_hand ) ; sigaction(SIGSEGV, NULL , &sigact) ; EXPECT_TRUE( sigact.sa_handler == sig_hand ) ; + sigaction(SIGCHLD, NULL , &sigact) ; + EXPECT_TRUE( sigact.sa_handler == child_handler ) ; sigaction(SIGFPE, NULL , &sigact) ; #if __APPLE__ EXPECT_TRUE( sigact.sa_handler == fpe_sig_handler ) ;