1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

emulate original behaviour

This commit is contained in:
Shannon Wynter 2016-04-18 14:38:24 +10:00
parent c903f14189
commit a4387d0c92

View File

@ -120,6 +120,9 @@ func (p *Process) Parent() (*Process, error) {
if err != nil {
return nil, err
}
if p.parent == 0 {
return nil, fmt.Errorf("wrong number of parents")
}
return NewProcess(p.parent)
}
func (p *Process) Status() (string, error) {