shirou_gopsutil/process/process_posix_test.go

22 lines
316 B
Go
Raw Normal View History

2021-12-23 05:54:41 +08:00
//go:build linux || freebsd
// +build linux freebsd
2014-12-30 21:09:05 +08:00
package process
import (
"os"
"testing"
"golang.org/x/sys/unix"
)
2014-04-30 15:22:54 +08:00
func Test_SendSignal(t *testing.T) {
2014-04-30 15:16:07 +08:00
checkPid := os.Getpid()
p, _ := NewProcess(int32(checkPid))
err := p.SendSignal(unix.SIGCONT)
if err != nil {
t.Errorf("send signal %v", err)
}
}