1 From 2d0eff7f56936823d784425d2171be295ba11027 Mon Sep 17 00:00:00 2001
2 From: Yousong Zhou <yszhou4tech@gmail.com>
3 Date: Fri, 15 May 2015 15:55:10 +0800
4 Subject: [PATCH 209/210] xl2tpd: ignore SIGPIPE signal.
8 1 file changed, 1 insertion(+), 1 deletion(-)
10 diff --git a/xl2tpd.c b/xl2tpd.c
11 index c11fe66..58ed868 100644
14 @@ -1551,7 +1551,6 @@ void do_control ()
15 /*FIXME: check quotes to allow filenames with spaces?
16 (do not forget quotes escaping to allow filenames with quotes)*/
18 - /*FIXME: write to res_filename may cause SIGPIPE, need to catch it*/
19 resf = fopen (res_filename, "w");
21 l2tp_log (LOG_DEBUG, "%s: Can't open result file %s\n",
22 @@ -1811,6 +1810,7 @@ void init (int argc,char *argv[])
23 signal (SIGCHLD, &sigchld_handler);
24 signal (SIGUSR1, &sigusr1_handler);
25 signal (SIGHUP, &sighup_handler);
26 + signal (SIGPIPE, SIG_IGN);
29 unlink(gconfig.controlfile);