mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 21:21:15 -03:00
Add basic signal test
This commit is contained in:
@@ -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
0
tests/signal.err
Normal file
6
tests/signal.in
Normal file
6
tests/signal.in
Normal 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
1
tests/signal.out
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALRM received
|
||||||
Reference in New Issue
Block a user