//go:build !windows
// +build !windows

package stario

import (
	"errors"
	"os"
	"syscall"
)

func signal(sigtype rune) error {
	switch sigtype {
	case 0x03:
		syscall.Kill(os.Getpid(), syscall.SIGINT)
		return errors.New("SIGNAL SIGINT RECIVED")
	case 0x1a:
		syscall.Kill(os.Getpid(), syscall.SIGSTOP)
		return errors.New("SIGNAL SIGSTOP RECIVED")
	case 0x1c:
		syscall.Kill(os.Getpid(), syscall.SIGQUIT)
		return errors.New("SIGNAL SIGQUIT RECIVED")
	default:
		return nil
	}
}
