packages/net/xl2tpd/patches/209-xl2tpd-ignore-SIGPIPE-signal.patch
Yousong Zhou 59f33d2aa7 xl2tpd: refactor for more resilience.
- Use netifd no_proto_task for notifying that xl2tpd does not have a
   protocol task running.
 - Use procd for xl2tpd service management.
 - Refreshed 2xx patches to

    - Prevent leftover regular type control result file.
    - Allow xl2tpd run as foreground process while logging via syslog.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>

 - bumped version
 - removed dependency on `ip` package as routes are setup by netifd
   if iproute2 is actually required, please depend on
   `@(PACKAGE_ip||PACKAGE_ip-full)` instead of `ip`

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
2015-05-24 12:18:38 +02:00

32 lines
1 KiB
Diff

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