When an ell main loop based process is spun off as a child
and the parent process dies due to a segfault, the child process
is still left running and needs to detect the segfault condition.
To address this need, add watch and signal handler for SIGSEGV.
ell/main.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/ell/main.c b/ell/main.c
index a479b74..712cfb7 100644
@@ -619,6 +619,14 @@ static void sigterm_handler(void *user_data)
+static void sigsegv_handler(void *user_data)
+ struct signal_data *data = user_data;
+ if (data->callback)
+ data->callback(SIGSEGV, data->user_data);
actually this is not enough. I never included SIGSEGV here for the simple reason since you
have to do a lot of work when that signal happens.
What we need to do is to add proper child spawning handling that does all the nasty signal
handling for you. Otherwise you are just about to create zombies. For now if you need
child handling, then add your own signal handler instead trying to overload
l_main_run_with_signal with it.