Thread overview
[Issue 21649] Make D runtime ignore or handle SIGPIPE or document the behavior
Feb 19, 2021
Vladimir Panteleev
Feb 19, 2021
Vladimir Panteleev
February 19, 2021
https://issues.dlang.org/show_bug.cgi?id=21649

Steven Schveighoffer <schveiguy@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schveiguy@gmail.com

--- Comment #1 from Steven Schveighoffer <schveiguy@gmail.com> ---
I would suggest this be resolved as WONTFIX

As I said in the forums, ignoring SIGPIPE is a process-wide setting, not suitable for all environments, so D should not be doing this to intialize the runtime.

2 examples come to mind:

- starting a child process will inherit the signal ignoring, which means you
alter the default behavior of those processes (which may depend on SIGPIPE
being triggered)
- Other libraries might depend on SIGPIPE not being ignored.

I think the correct mechanism is to manually ignore the signal on program startup if that is your preference.

--
February 19, 2021
https://issues.dlang.org/show_bug.cgi?id=21649

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dlang-bugzilla@thecybershad
                   |                            |ow.net

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
std.socket uses the MSG_NOSIGNAL flag with send to prevent SIGPIPE.

--
February 19, 2021
https://issues.dlang.org/show_bug.cgi?id=21649

Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #3 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
I agree with Steven's assessment.

--