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:
parent
c903f14189
commit
a4387d0c92
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user