提交 665ddbd7 编写于 作者: W WAKAYAMA Shirou

add signal test stub on windows. and move to signal test process_test_posix

上级 d1b1221e
......@@ -6,7 +6,6 @@ import (
"os"
"runtime"
"testing"
"syscall"
)
func Test_Pids(t *testing.T) {
......@@ -66,14 +65,3 @@ func Test_Process_memory_maps(t *testing.T) {
}
}
func Test_SendSignal(t *testing.T){
check_pid := os.Getpid()
p, _ := NewProcess(int32(check_pid))
err := p.Send_signal(syscall.SIGCONT)
if err != nil{
t.Errorf("send signal %v", err)
}
}
// +build linux freebsd
package gopsutil
import (
"os"
"syscall"
"testing"
)
func Test_SendSignal(t *testing.T) {
check_pid := os.Getpid()
p, _ := NewProcess(int32(check_pid))
err := p.Send_signal(syscall.SIGCONT)
if err != nil {
t.Errorf("send signal %v", err)
}
}
......@@ -85,6 +85,22 @@ func NewProcess(pid int32) (*Process, error) {
return p, nil
}
func (p *Process) Send_signal(sig syscall.Signal) error {
return nil
}
func (p *Process) Suspend() error {
return nil
}
func (p *Process) Resume() error {
return nil
}
func (p *Process) Terminate() error {
return nil
}
func (p *Process) Kill() error {
return nil
}
func copy_params(pe32 *PROCESSENTRY32, p *Process) error {
p.Ppid = int32(pe32.Th32ParentProcessID)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册