Add basic signal test

This commit is contained in:
ridiculousfish 2019-02-20 17:07:29 -08:00
parent da04f757f9
commit 6bddf2c83b
4 changed files with 8 additions and 0 deletions

View file

@ -273,6 +273,7 @@ static void handle_sigalarm(int sig, siginfo_t *info, void *context) {
UNUSED(info); UNUSED(info);
UNUSED(context); UNUSED(context);
if (reraise_if_forked_child(sig)) return; if (reraise_if_forked_child(sig)) return;
default_handler(sig, info, context);
} }
void signal_reset_handlers() { void signal_reset_handlers() {

0
tests/signal.err Normal file
View file

6
tests/signal.in Normal file
View file

@ -0,0 +1,6 @@
function alarm --on-signal ALRM
echo ALRM received
end
kill -s ALRM $fish_pid

1
tests/signal.out Normal file
View file

@ -0,0 +1 @@
ALRM received