[process] Fix #773 remove data race in NewProcess
Reproduction case https://github.com/shirou/gopsutil/issues/773#issuecomment-554723678
This commit is contained in:
parent
c9a2a69ca7
commit
e34a731c69
|
@ -163,7 +163,7 @@ func NewProcess(pid int32) (*Process, error) {
|
|||
if !exists {
|
||||
return p, ErrorProcessNotRunning
|
||||
}
|
||||
go p.CreateTime()
|
||||
p.CreateTime()
|
||||
return p, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue