After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 728730 - gsocket: Set SO_NOSIGPIPE on sockets on Darwin
gsocket: Set SO_NOSIGPIPE on sockets on Darwin
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: network
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-04-22 14:00 UTC by Philip Withnall
Modified: 2014-07-21 15:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gsocket: Set SO_NOSIGPIPE on sockets on Darwin (1.96 KB, patch)
2014-04-22 14:00 UTC, Philip Withnall
none Details | Review

Description Philip Withnall 2014-04-22 14:00:02 UTC
Patch attached which marginally improves the debugging experience on Xcode on Darwin.
Comment 1 Philip Withnall 2014-04-22 14:00:04 UTC
Created attachment 274891 [details] [review]
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.
Comment 2 Dan Winship 2014-05-01 14:01:37 UTC
I pushed a slightly-modified version to wip/nosigpipe. Can you confirm it still compiles/works?
Comment 3 Philip Withnall 2014-05-06 21:49:47 UTC
(In reply to comment #2)
> I pushed a slightly-modified version to wip/nosigpipe. Can you confirm it still
> compiles/works?

Unfortunately I might not have access to that Mac again for a week or two. The patch looks good to me, and I’ll test it out when I next get access.
Comment 4 Philip Withnall 2014-06-16 09:38:48 UTC
(In reply to comment #2)
> I pushed a slightly-modified version to wip/nosigpipe. Can you confirm it still
> compiles/works?

I finally got access to the Mac again, and the two patches compile and work nicely.