• Elias Naur's avatar
    runtime: don't forward SIGPIPE on macOS · d56a86e0
    Elias Naur authored
    macOS and iOS deliver SIGPIPE signals to the main thread and not
    the thread that raised it by writing to a closed socket or pipe.
    
    SIGPIPE signals can be suppressed for sockets with the SO_NOSIGPIPE
    option, but there is no similar option for pipes. We have no other
    choice but to never forward SIGPIPE on macOS.
    
    Fixes #33384
    
    Change-Id: Ice3de75b121f00006ee11c26d560e619536460be
    Reviewed-on: https://go-review.googlesource.com/c/go/+/188297
    Run-TryBot: Elias Naur <mail@eliasnaur.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    d56a86e0
main3.c 3.93 KB