File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -747,6 +747,26 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
747
747
< a href ="/pkg/os/#SyscallError "> < code > SyscallError</ code > </ a > .
748
748
</ li >
749
749
750
+ < li >
751
+ On Unix-like systems, when a write
752
+ to < a href ="/pkg/os/#pkg-variables "> < code > os.Stdout</ code >
753
+ or < code > os.Stderr</ code > </ a > (more precisely, an < code > os.File</ code >
754
+ opened for file descriptor 1 or 2) fails due to a broken pipe error,
755
+ the program will raise a < code > SIGPIPE</ code > signal.
756
+ By default this will cause the program to exit; this may be changed by
757
+ calling the
758
+ < a href ="/pkg/os/signal "> < code > os/signal</ code > </ a >
759
+ < a href ="/pkg/os/signal/#Notify "> < code > Notify</ code > </ a > function
760
+ for < code > syscall.SIGPIPE</ code > .
761
+ A write to a broken pipe on a file descriptor other 1 or 2 will simply
762
+ return < code > syscall.EPIPE</ code > (possibly wrapped in
763
+ < a href ="/pkg/os#PathError "> < code > os.PathError</ code > </ a >
764
+ and/or < a href ="/pkg/os#SyscallError "> < code > os.SyscallError</ code > </ a > )
765
+ to the caller.
766
+ The old behavior of raising an uncatchable < code > SIGPIPE</ code > signal
767
+ after 10 consecutive writes to a broken pipe no longer occurs.
768
+ </ li >
769
+
750
770
< li >
751
771
In the < a href ="/pkg/os/exec/ "> < code > os/exec</ code > </ a > package,
752
772
< a href ="/pkg/os/exec/#Cmd "> < code > Cmd</ code > </ a > 's
You can’t perform that action at this time.
0 commit comments