mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 00:50:37 +08:00
Teach fish_test_helper to sigint_self
Preparation for more tests around signals.
This commit is contained in:
parent
79255dfe9b
commit
d88bee3a57
|
@ -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"},
|
||||
|
|
Loading…
Reference in New Issue
Block a user