Ignore SIGPIPE
If there's no reading end (client closed connection) and quark tries to write to the socket, it will get a SIGPIPE. Just ignore it.
This commit is contained in:
parent
5d20e3dc27
commit
8fdfa36914
1 changed files with 1 additions and 0 deletions
1
quark.c
1
quark.c
|
@ -531,6 +531,7 @@ main(int argc, char *argv[]) {
|
||||||
signal(SIGQUIT, sighandler);
|
signal(SIGQUIT, sighandler);
|
||||||
signal(SIGABRT, sighandler);
|
signal(SIGABRT, sighandler);
|
||||||
signal(SIGTERM, sighandler);
|
signal(SIGTERM, sighandler);
|
||||||
|
signal(SIGPIPE, SIG_IGN);
|
||||||
|
|
||||||
/* init */
|
/* init */
|
||||||
setbuf(stdout, NULL); /* unbuffered stdout */
|
setbuf(stdout, NULL); /* unbuffered stdout */
|
||||||
|
|
Loading…
Reference in a new issue