Enable SO_NOSIGPIPE for sockets on OS X.
This commit is contained in:
parent
f44486cc85
commit
006207742f
1 changed files with 4 additions and 0 deletions
|
|
@ -205,6 +205,10 @@ proc newSocket*(fd: SocketHandle, domain: Domain = AF_INET,
|
||||||
if buffered:
|
if buffered:
|
||||||
result.currPos = 0
|
result.currPos = 0
|
||||||
|
|
||||||
|
# Set SO_NOSIGPIPE on OS X.
|
||||||
|
when defined(macosx):
|
||||||
|
setSockOptInt(fd, SOL_SOCKET, SO_NOSIGPIPE, 1)
|
||||||
|
|
||||||
proc newSocket*(domain, sockType, protocol: cint, buffered = true): Socket =
|
proc newSocket*(domain, sockType, protocol: cint, buffered = true): Socket =
|
||||||
## Creates a new socket.
|
## Creates a new socket.
|
||||||
##
|
##
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue