mirror of https://github.com/omar-polo/gmid.git
ignore SIGPIPE
bad clients can shutdown the socket and we will exit due to a SIGPIPE. it ain’t fun.
This commit is contained in:
parent
9468027ba7
commit
0cf902af62
3
gmid.c
3
gmid.c
|
@ -25,6 +25,7 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <poll.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -668,6 +669,8 @@ main(int argc, char **argv)
|
|||
struct tls_config *conf;
|
||||
int sock, ch;
|
||||
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
|
||||
while ((ch = getopt(argc, argv, "c:d:hk:")) != -1) {
|
||||
switch (ch) {
|
||||
case 'c':
|
||||
|
|
Loading…
Reference in New Issue