[process] Fix #773 remove data race in NewProcess

Reproduction case https://github.com/shirou/gopsutil/issues/773#issuecomment-554723678
This commit is contained in:
Lomanic 2019-11-17 20:09:17 +01:00
parent c9a2a69ca7
commit e34a731c69
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ func NewProcess(pid int32) (*Process, error) {
if !exists {
return p, ErrorProcessNotRunning
}
go p.CreateTime()
p.CreateTime()
return p, nil
}