]> Cypherpunks repositories - gostls13.git/commit
os/signal: add func Ignored(sig Signal) bool
authorAdam Azarchs <adam.azarchs@10xgenomics.com>
Fri, 20 Apr 2018 02:59:39 +0000 (19:59 -0700)
committerIan Lance Taylor <iant@golang.org>
Sat, 21 Apr 2018 04:18:03 +0000 (04:18 +0000)
commitdfb1b696656bd56e10c3085e145fe5f40dc2ba42
treec15f6e80b89d8399d53c8a345a55293127ec8548
parent37dd7cd040e626d5a9c30f2880005643b3a23d22
os/signal: add func Ignored(sig Signal) bool

Ignored reports whether sig is currently ignored.

This implementation only works applies on Unix systems for now.  However, at
the moment that is also the case for Ignore() and several other signal
interaction methods, so that seems fair.

Fixes #22497

Change-Id: I7c1b1a5e12373ca5da44709500ff5acedc6f1316
Reviewed-on: https://go-review.googlesource.com/108376
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/os/signal/signal.go
src/os/signal/signal_plan9.go
src/os/signal/signal_test.go
src/os/signal/signal_unix.go
src/runtime/signal_unix.go
src/runtime/sigqueue.go
src/runtime/sigqueue_plan9.go