mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
[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…
x
Reference in New Issue
Block a user