summary refs log tree commit diff stats
path: root/lib/pure/rawsockets.nim
diff options
context:
space:
mode:
authorAudun Wilhelmsen <skyfex@gmail.com>2015-01-02 22:12:11 +0100
committerAudun Wilhelmsen <skyfex@gmail.com>2015-01-02 22:12:11 +0100
commitc461f5a8c6cbc753f47393de61e713b25e743661 (patch)
tree03281686f16d4a2876dc0713bca8f47ad6c9a855 /lib/pure/rawsockets.nim
parente5bfb7d55017a0f205682f34c01ac709dcf82940 (diff)
parent5023a9043858941d311c253fd1b62017080367be (diff)
downloadNim-c461f5a8c6cbc753f47393de61e713b25e743661.tar.gz
Merge branch 'devel' of https://github.com/Araq/Nim into devel
Diffstat (limited to 'lib/pure/rawsockets.nim')
-rw-r--r--lib/pure/rawsockets.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/rawsockets.nim b/lib/pure/rawsockets.nim
index 62a011999..e23deea5b 100644
--- a/lib/pure/rawsockets.nim
+++ b/lib/pure/rawsockets.nim
@@ -428,6 +428,10 @@ proc selectWrite*(writefds: var seq[SocketHandle],
   
   pruneSocketSet(writefds, (wr))
 
+# We ignore signal SIGPIPE on Darwin
+when defined(macosx):
+  signal(SIGPIPE, SIG_IGN)
+
 when defined(Windows):
   var wsa: WSAData
   if wsaStartup(0x0101'i16, addr wsa) != 0: raiseOSError(osLastError())