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: http://git.onelab.eu/?a=commitdiff_plain;h=69abd4346d21c24fe7e18eff538332434564979e;p=sliver-openvswitch.git Prevent the secchan from dying due to SIGPIPE. Fix for bug #88. --- diff --git a/controller/controller.c b/controller/controller.c index bc18748e4..01037bbb0 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 64a1f233a..af52ed5eb 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 3a02f6460..3a9c60426 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 8a075f915..b074edd79 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;