From: Burcu Dogan Date: Thu, 29 Oct 2015 07:02:02 +0000 (-0700) Subject: os/signal: don't expect to be notified for os.Kill X-Git-Tag: go1.6beta1~688 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3356624df3414a3ca0c8390ca433a0811e552872;p=gostls13.git os/signal: don't expect to be notified for os.Kill os.Kill cannot be caught on Unix systems. The example gives the false impression that it can. Fixes #13080. Change-Id: I3b9e6f38a38f437a463c5b869ae84a0d3fd23f72 Reviewed-on: https://go-review.googlesource.com/16467 Reviewed-by: Andrew Gerrand --- diff --git a/src/os/signal/example_test.go b/src/os/signal/example_test.go index 079ee50702..5dfbe5f26b 100644 --- a/src/os/signal/example_test.go +++ b/src/os/signal/example_test.go @@ -15,7 +15,7 @@ func ExampleNotify() { // We must use a buffered channel or risk missing the signal // if we're not ready to receive when the signal is sent. c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, os.Kill) + signal.Notify(c, os.Interrupt) // Block until a signal is received. s := <-c