vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit 00b115cbea771e85ab2d521a3c36ed638707566e
parent 3841e49593b124cf0f8e4dd294922e5edce8b712
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue, 25 Jul 2017 20:07:48 +0200

vis: ignore SIGQUIT

Pressing Ctrl+\ should probably not terminate the editor.
In previous versions libtermkey would disable signal
generation by disabling termios VQUIT. However, curses
probably overrides it when they both fight for terminal
settings. This should probably be cleaned up at some point.

Ignoring SIGQUIT seems like a good idea anyway.

Diffstat:
Mmain.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main.c b/main.c @@ -2389,8 +2389,8 @@ int main(int argc, char *argv[]) { } sa.sa_handler = SIG_IGN; - if (sigaction(SIGPIPE, &sa, NULL) == -1) - vis_die(vis, "Failed to ignore SIGPIPE\n"); + if (sigaction(SIGPIPE, &sa, NULL) == -1 || sigaction(SIGQUIT, &sa, NULL) == -1) + vis_die(vis, "Failed to ignore signals\n"); sigset_t blockset; sigemptyset(&blockset);