From ca35f1f5f38476113ac45f2877a00605b6c69138 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Wed, 24 Jan 2024 20:37:50 -0600 Subject: [PATCH] lib: core: reset SIGINT in the child If we're run, e.g., directly from another lua script, then SIGINT may be ignored. Reset SIGINT's disposition so that the parent can kill it upon respawn or finishing the .orch script. Signed-off-by: Kyle Evans --- lib/core/orch_spawn.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/core/orch_spawn.c b/lib/core/orch_spawn.c index 57bea79..715072f 100644 --- a/lib/core/orch_spawn.c +++ b/lib/core/orch_spawn.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -248,6 +249,8 @@ orch_exec(int argc __unused, const char *argv[], struct termios *t) { int error; + signal(SIGINT, SIG_DFL); + /* * Register a couple of events that the script may want to use: * - IPC_TERMIOS_INQUIRY: sent our terminal attributes back over.