From: Ben Pfaff Date: Tue, 12 Aug 2008 23:21:45 +0000 (-0700) Subject: Prevent the secchan from dying due to SIGPIPE. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69abd4346d21c24fe7e18eff538332434564979e;p=openvswitch Prevent the secchan from dying due to SIGPIPE. Fix for bug #88. --- diff --git a/controller/controller.c b/controller/controller.c index bc18748e..01037bbb 100644 --- a/controller/controller.c +++ b/controller/controller.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -93,6 +94,7 @@ main(int argc, char *argv[]) time_init(); vlog_init(); parse_options(argc, argv); + signal(SIGPIPE, SIG_IGN); if (argc - optind < 1) { fatal(0, "at least one vconn argument required; use --help for usage"); diff --git a/secchan/secchan.c b/secchan/secchan.c index 64a1f233..af52ed5e 100644 --- a/secchan/secchan.c +++ b/secchan/secchan.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -179,6 +180,7 @@ main(int argc, char *argv[]) time_init(); vlog_init(); parse_options(argc, argv, &s); + signal(SIGPIPE, SIG_IGN); /* Start listening for management connections. */ if (s.listen_vconn_name) { diff --git a/switch/switch.c b/switch/switch.c index 3a02f646..3a9c6042 100644 --- a/switch/switch.c +++ b/switch/switch.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -81,6 +82,7 @@ main(int argc, char *argv[]) time_init(); vlog_init(); parse_options(argc, argv); + signal(SIGPIPE, SIG_IGN); if (argc - optind != 1) { fatal(0, "missing controller argument; use --help for usage"); diff --git a/utilities/dpctl.c b/utilities/dpctl.c index 8a075f91..b074edd7 100644 --- a/utilities/dpctl.c +++ b/utilities/dpctl.c @@ -88,6 +88,7 @@ int main(int argc, char *argv[]) time_init(); vlog_init(); parse_options(argc, argv); + signal(SIGPIPE, SIG_IGN); argc -= optind; argv += optind;