[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r37100 - branches/mhd-0.9.50/src/microhttpd
From: |
gnunet |
Subject: |
[GNUnet-SVN] r37100 - branches/mhd-0.9.50/src/microhttpd |
Date: |
Fri, 29 Apr 2016 23:14:42 +0200 |
Author: Karlson2k
Date: 2016-04-29 23:14:42 +0200 (Fri, 29 Apr 2016)
New Revision: 37100
Modified:
branches/mhd-0.9.50/src/microhttpd/daemon.c
Log:
daemon.c: OS X: set SO_NOSIGPIPE on listen socket.
Modified: branches/mhd-0.9.50/src/microhttpd/daemon.c
===================================================================
--- branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:39 UTC (rev
37099)
+++ branches/mhd-0.9.50/src/microhttpd/daemon.c 2016-04-29 21:14:42 UTC (rev
37100)
@@ -3572,6 +3572,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. */
@@ -3592,6 +3595,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;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r37100 - branches/mhd-0.9.50/src/microhttpd,
gnunet <=