// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

//go:build unix || (js && wasm) || wasip1 || windows

package signal

import (
	
	
)

// Defined by the runtime package.
func signal_disable(uint32)
func signal_enable(uint32)
func signal_ignore(uint32)
func signal_ignored(uint32) bool
func signal_recv() uint32

func loop() {
	for {
		process(syscall.Signal(signal_recv()))
	}
}

func init() {
	watchSignalLoop = loop
}

const (
	numSig = 65 // max across all systems
)

func signum( os.Signal) int {
	switch sig := .(type) {
	case syscall.Signal:
		 := int()
		if  < 0 ||  >= numSig {
			return -1
		}
		return 
	default:
		return -1
	}
}

func enableSignal( int) {
	signal_enable(uint32())
}

func disableSignal( int) {
	signal_disable(uint32())
}

func ignoreSignal( int) {
	signal_ignore(uint32())
}

func signalIgnored( int) bool {
	return signal_ignored(uint32())
}