From 0ccfbc834a489f92745613b2e06275c2cfe6ace0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20Mengu=C3=A9?= Date: Thu, 24 Apr 2025 16:46:44 +0200 Subject: [PATCH] os/signal: doc link to syscall.EPIPE Add godoc link for EPIPE error. Change-Id: I5df35f700684510328f92bb5d4946c5123ba5f2c Reviewed-on: https://go-review.googlesource.com/c/go/+/667757 Auto-Submit: Michael Knyszek Reviewed-by: Michael Pratt Reviewed-by: Michael Knyszek LUCI-TryBot-Result: Go LUCI --- src/os/signal/doc.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/os/signal/doc.go b/src/os/signal/doc.go index 1d3e6eb573..df942b8428 100644 --- a/src/os/signal/doc.go +++ b/src/os/signal/doc.go @@ -98,12 +98,13 @@ the behavior depends on the file descriptor number. A write to a broken pipe on file descriptors 1 or 2 (standard output or standard error) will cause the program to exit with a SIGPIPE signal. A write to a broken pipe on some other file descriptor will take no action on -the SIGPIPE signal, and the write will fail with an EPIPE error. +the SIGPIPE signal, and the write will fail with a [syscall.EPIPE] +error. If the program has called Notify to receive SIGPIPE signals, the file descriptor number does not matter. The SIGPIPE signal will be -delivered to the Notify channel, and the write will fail with an EPIPE -error. +delivered to the Notify channel, and the write will fail with a +[syscall.EPIPE] error. This means that, by default, command line programs will behave like typical Unix command line programs, while other programs will not -- 2.50.0