diff options
| author | Quentin Carbonneaux | 2014-12-26 09:26:13 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-12-26 09:26:13 -0500 |
| commit | ad7d23c907ab60797d9c2cffe3f30f76624c1de8 (patch) | |
| tree | dcf5c658672f6e826baa2ef2c9aa072173a5810b | |
| parent | b1634e68630d9d46af933225858969d6d3e42e48 (diff) | |
ignore SIGPIPE
Otherwise, the editor crashes when using the redirection
sigils with a command that closes the pipe.
| -rw-r--r-- | main.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1,6 +1,7 @@ #include <assert.h> #include <ctype.h> #include <setjmp.h> +#include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -162,6 +163,7 @@ main(int ac, char *av[]) { int guifd; + signal(SIGPIPE, SIG_IGN); g = &gui_x11; guifd = g->init(); ev_register(guifd, ERead, gev, 0); |
