]> Cypherpunks repositories - gostls13.git/commit
os/signal: add ability to ignore signals and restore initial signal handlers
authorMichael MacInnis <michael.p.macinnis@gmail.com>
Fri, 30 Jan 2015 03:37:41 +0000 (22:37 -0500)
committerIan Lance Taylor <iant@golang.org>
Mon, 16 Feb 2015 14:23:09 +0000 (14:23 +0000)
commit194ad16b834daf7ad8fb468845c5532f528970a6
tree427b08d5a8ff2f2dab35e1771f37d15cad414112
parent10a4696fb8d080b334a31f0cf43a7ffe3c588ad7
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>
12 files changed:
src/os/signal/sig.s
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/os1_nacl.go
src/runtime/os1_windows_386.go
src/runtime/os1_windows_amd64.go
src/runtime/os3_plan9.go
src/runtime/signal1_unix.go
src/runtime/sigqueue.go
src/runtime/sigqueue_plan9.go