1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
15 func signal_disable(uint32)
16 func signal_enable(uint32)
17 func signal_recv() uint32
21 process(syscall
.Signal(signal_recv()))
26 signal_enable(0) // first call - initialize
31 numSig
= 65 // max across all systems
34 func signum(sig os
.Signal
) int {
35 switch sig
:= sig
.(type) {
38 if i
< 0 || i
>= numSig
{
47 func enableSignal(sig
int) {
48 signal_enable(uint32(sig
))
51 func disableSignal(sig
int) {
52 signal_disable(uint32(sig
))