gsocket: Set SO_NOSIGPIPE on sockets on Darwin
authorDan Winship <danw@gnome.org>
Thu, 1 May 2014 13:59:05 +0000 (09:59 -0400)
committerDan Winship <danw@gnome.org>
Mon, 21 Jul 2014 15:31:27 +0000 (11:31 -0400)
commit634b69219979c084837c59874e5b2aec01a1d3e4
treedda89061ef0657f0b1661fa8aa592dda8fb2247d
parent7b34e07ac4576b75bcf932fd8dfeca23242ea1b1
gsocket: Set SO_NOSIGPIPE on sockets on Darwin

This is a best-effort approach to preventing SIGPIPE emissions on Darwin
and iOS, where they continue to be intercepted by the Xcode debugger
even if SIG_IGN prevents them crashing the program.

This is similar to the existing code which sets MSG_NOSIGNAL on all
send() calls. MSG_NOSIGNAL doesn't exist on Darwin though.

Based on a patch from Philip Withnall.

https://bugzilla.gnome.org/show_bug.cgi?id=728730
gio/gsocket.c