Skip to content

Commit 5bb6d16

Browse files
committed
os/signal: add Notify windows documentation
Add that Notify only accepts os.Interrupt signal on windows. Updates #77076 Change-Id: I09a3ae68d198d615f12ee7de6082c4993f39f140 Reviewed-on: https://go-review.googlesource.com/c/go/+/770920 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Carlos Amedee <carlos@golang.org>
1 parent a63b23f commit 5bb6d16

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/os/signal/doc.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,9 @@ before raising the signal.
213213
On Windows a ^C (Control-C) or ^BREAK (Control-Break) normally cause
214214
the program to exit. If Notify is called for [os.Interrupt], ^C or ^BREAK
215215
will cause [os.Interrupt] to be sent on the channel, and the program will
216-
not exit. If Reset is called, or Stop is called on all channels passed
217-
to Notify, then the default behavior will be restored.
216+
not exit. [os.Interrupt] is the only signal that can be used on Windows.
217+
If Reset is called, or Stop is called on all channels passed to Notify,
218+
then the default behavior will be restored.
218219
219220
Additionally, if Notify is called, and Windows sends CTRL_CLOSE_EVENT,
220221
CTRL_LOGOFF_EVENT or CTRL_SHUTDOWN_EVENT to the process, Notify will

0 commit comments

Comments
 (0)