From ea5d3ba2413a7daa740ad8d20233d127801c36a2 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Sat, 20 Jun 2009 17:34:59 +0000 Subject: [PATCH] Set nosigpipe socket option on platforms that send sigpipes in coroipcc. git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@2273 fd59a12c-fef9-0310-b244-a6a79926bd2f --- lib/coroipcc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/coroipcc.c b/lib/coroipcc.c index 064de17c..86813ba7 100644 --- a/lib/coroipcc.c +++ b/lib/coroipcc.c @@ -94,7 +94,7 @@ DECLARE_HDB_DATABASE(ipc_hdb,ipc_hdb_destructor); #endif #ifdef SO_NOSIGPIPE -void socket_nosigpipe(int s) +static void socket_nosigpipe(int s) { int on = 1; setsockopt(s, SOL_SOCKET, SO_NOSIGPIPE, (void *)&on, sizeof(on)); @@ -546,6 +546,9 @@ coroipcc_service_connect ( if (request_fd == -1) { return (CS_ERR_LIBRARY); } +#ifdef SO_NOSIGPIPE + socket_nosigpipe (request_fd); +#endif memset (&address, 0, sizeof (struct sockaddr_un)); address.sun_family = AF_UNIX;