diff --git a/src/fish_test_helper.cpp b/src/fish_test_helper.cpp index d8da3f6cc..009442579 100644 --- a/src/fish_test_helper.cpp +++ b/src/fish_test_helper.cpp @@ -156,6 +156,11 @@ static void sigkill_self() { abort(); } +static void sigint_self() { + kill(getpid(), SIGINT); + abort(); +} + static void stdin_make_nonblocking() { const int fd = STDIN_FILENO; // Catch SIGCONT so pause() wakes us up. @@ -203,6 +208,7 @@ static fth_command_t s_commands[] = { {"print_ignored_signals", print_ignored_signals, "Print to stdout the name(s) of ignored signals"}, {"print_stop_cont", print_stop_cont, "Print when we get SIGTSTP and SIGCONT, exiting on input"}, + {"sigint_self", sigint_self, "Send SIGINT to self"}, {"sigkill_self", sigkill_self, "Send SIGKILL to self"}, {"stdin_make_nonblocking", stdin_make_nonblocking, "Print if stdin is blocking and then make it nonblocking"},