You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.0 KiB

  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.
  5. ---
  6. xl2tpd.c | 2 +-
  7. 1 file changed, 1 insertion(+), 1 deletion(-)
  8. diff --git a/xl2tpd.c b/xl2tpd.c
  9. index c11fe66..58ed868 100644
  10. --- a/xl2tpd.c
  11. +++ b/xl2tpd.c
  12. @@ -1551,7 +1551,6 @@ void do_control ()
  13. /*FIXME: check quotes to allow filenames with spaces?
  14. (do not forget quotes escaping to allow filenames with quotes)*/
  15. - /*FIXME: write to res_filename may cause SIGPIPE, need to catch it*/
  16. resf = fopen (res_filename, "w");
  17. if (!resf) {
  18. l2tp_log (LOG_DEBUG, "%s: Can't open result file %s\n",
  19. @@ -1811,6 +1810,7 @@ void init (int argc,char *argv[])
  20. signal (SIGCHLD, &sigchld_handler);
  21. signal (SIGUSR1, &sigusr1_handler);
  22. signal (SIGHUP, &sighup_handler);
  23. + signal (SIGPIPE, SIG_IGN);
  24. init_scheduler ();
  25. unlink(gconfig.controlfile);
  26. --
  27. 1.7.10.4