gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r37083 - libmicrohttpd/src/microhttpd


From: gnunet
Subject: [GNUnet-SVN] r37083 - libmicrohttpd/src/microhttpd
Date: Fri, 29 Apr 2016 21:44:12 +0200

Author: Karlson2k
Date: 2016-04-29 21:44:12 +0200 (Fri, 29 Apr 2016)
New Revision: 37083

Modified:
   libmicrohttpd/src/microhttpd/daemon.c
Log:
daemon.c: OS X: set SO_NOSIGPIPE on listen socket.

Modified: libmicrohttpd/src/microhttpd/daemon.c
===================================================================
--- libmicrohttpd/src/microhttpd/daemon.c       2016-04-26 22:32:27 UTC (rev 
37082)
+++ libmicrohttpd/src/microhttpd/daemon.c       2016-04-29 19:44:12 UTC (rev 
37083)
@@ -3598,6 +3598,9 @@
 {
   MHD_socket fd;
   int cloexec_set;
+#if defined(OSX) && defined(SOL_SOCKET) && defined(SO_NOSIGPIPE)
+  static const int on_val = 1;
+#endif
 
   /* use SOCK_STREAM rather than ai_socktype: some getaddrinfo
    * implementations do not set ai_socktype, e.g. RHL6.2. */
@@ -3618,6 +3621,9 @@
     }
   if (MHD_INVALID_SOCKET == fd)
     return MHD_INVALID_SOCKET;
+#if defined(OSX) && defined(SOL_SOCKET) && defined(SO_NOSIGPIPE)
+  setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &on_val, sizeof(on_val));
+#endif
   if (MHD_NO == cloexec_set)
     make_noninheritable (daemon, fd);
   return fd;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]