From: Tobias Ulmer Date: Fri, 15 Feb 2019 10:38:28 +0000 (+0100) Subject: e2lib: interrupt_hook: send interrupt to children X-Git-Tag: e2factory-2.3.18rc1~44 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=3e156774d7380d2375a62290133d79084d12505d;p=e2factory.git e2lib: interrupt_hook: send interrupt to children note interrupt_hook() no longer terminates e2factory Signed-off-by: Tobias Ulmer --- diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 2ea35e8..44a50f1 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -519,13 +519,10 @@ function e2lib.execvp(filenm, argv) end --- Interrupt handling. --- signal_install() sets up signal handlers that call back into this function. +-- le2lib.signal_install() installs a handler calling back into this function. function e2lib.interrupt_hook() - local sigstr, signum = e2lib.signal_received() trace.install() -- reinstall the trace hook. - e2lib.logf(4, "interrupt_hook() pid=%d, signal=%d, sigstr=%s", - e2lib.getpid(), signum, sigstr) - e2lib.abort(string.format("*** interrupted by user (%s) ***", sigstr)) + children_send_sigint() end --- Make sure the environment variables inside the globals table are diff --git a/generic/le2lib.c b/generic/le2lib.c index 67a4ff6..28b5cef 100644 --- a/generic/le2lib.c +++ b/generic/le2lib.c @@ -796,10 +796,6 @@ lua_signal_handler(lua_State *L, lua_Debug *ar) lua_getfield(L, -1, "interrupt_hook"); lua_remove(L, -2); /* remove e2lib, balance stack */ lua_call(L, 0, 0); - - /* not reached under normal circumstances */ - fprintf(stderr, "e2: calling interrupt_hook failed, terminating\n"); - exit(1); } /* Lua context for signal handler */