diff options
author | Michael MacInnis <michael.p.macinnis@gmail.com> | 2015-01-29 22:37:41 -0500 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2015-02-16 14:23:09 +0000 |
commit | 194ad16b834daf7ad8fb468845c5532f528970a6 (patch) | |
tree | 427b08d5a8ff2f2dab35e1771f37d15cad414112 /src/runtime/sigqueue_plan9.go | |
parent | 10a4696fb8d080b334a31f0cf43a7ffe3c588ad7 (diff) | |
download | go-194ad16b834daf7ad8fb468845c5532f528970a6.tar.gz go-194ad16b834daf7ad8fb468845c5532f528970a6.zip |
os/signal: add ability to ignore signals and restore initial signal handlers
There is currently no way to ignore signals using the os/signal package.
It is possible to catch a signal and do nothing but this is not the same
as ignoring it. The new function Ignore allows a set of signals to be
ignored. The new function Reset allows the initial handlers for a set of
signals to be restored.
Fixes #5572
Change-Id: I5c0f07956971e3a9ff9b9d9631e6e3a08c20df15
Reviewed-on: https://go-review.googlesource.com/3580
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/sigqueue_plan9.go')
-rw-r--r-- | src/runtime/sigqueue_plan9.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/runtime/sigqueue_plan9.go b/src/runtime/sigqueue_plan9.go index b029a300a8..38f0a57b90 100644 --- a/src/runtime/sigqueue_plan9.go +++ b/src/runtime/sigqueue_plan9.go @@ -113,3 +113,7 @@ func signal_enable(s uint32) { // Must only be called from a single goroutine at a time. func signal_disable(s uint32) { } + +// Must only be called from a single goroutine at a time. +func signal_ignore(s uint32) { +} |