Commit 2a756625 authored by Ian Lance Taylor's avatar Ian Lance Taylor

doc: mention new SIGPIPE behavior in 1.6 release notes

Update #11845.

Change-Id: I1c248dc48abc62e51836b9ba50d6deb89706c730
Reviewed-on: https://go-review.googlesource.com/18226Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 934e055f
......@@ -747,6 +747,26 @@ now return correct results when inquiring about an
<a href="/pkg/os/#SyscallError"><code>SyscallError</code></a>.
</li>
<li>
On Unix-like systems, when a write
to <a href="/pkg/os/#pkg-variables"><code>os.Stdout</code>
or <code>os.Stderr</code></a> (more precisely, an <code>os.File</code>
opened for file descriptor 1 or 2) fails due to a broken pipe error,
the program will raise a <code>SIGPIPE</code> signal.
By default this will cause the program to exit; this may be changed by
calling the
<a href="/pkg/os/signal"><code>os/signal</code></a>
<a href="/pkg/os/signal/#Notify"><code>Notify</code></a> function
for <code>syscall.SIGPIPE</code>.
A write to a broken pipe on a file descriptor other 1 or 2 will simply
return <code>syscall.EPIPE</code> (possibly wrapped in
<a href="/pkg/os#PathError"><code>os.PathError</code></a>
and/or <a href="/pkg/os#SyscallError"><code>os.SyscallError</code></a>)
to the caller.
The old behavior of raising an uncatchable <code>SIGPIPE</code> signal
after 10 consecutive writes to a broken pipe no longer occurs.
</li>
<li>
In the <a href="/pkg/os/exec/"><code>os/exec</code></a> package,
<a href="/pkg/os/exec/#Cmd"><code>Cmd</code></a>'s
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment