We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Describe the bug [A clear and concise description of what the bug is.]
The time obtained by the CreateTime() method is unstable, which leads to unstable judgment results of the isRunning() method
The result of ctime is not a fixed value
To Reproduce
func isRunning(p *process.Process) (bool, error) { ctx := context.Background() createTime, err := p.CreateTimeWithContext(ctx) if err != nil { return false, err } logrus.Debugf("current process create time: %v", createTime) p2, err := process.NewProcessWithContext(ctx, p.Pid) if errors.Is(err, process.ErrorProcessNotRunning) { return false, nil } createTime2, err := p2.CreateTimeWithContext(ctx) if err != nil { return false, err } logrus.Debugf("new instance create time: %v", createTime2) return createTime == createTime2, nil }
Expected behavior [A clear and concise description of what you expected to happen.]
When the process is not restarted, the value of ctime should be fixed
Environment (please complete the following information):
ver
/etc/os-release
uname -a
sw_vers
freebsd-version -k -r -u
Additional context [Cross-compiling? Paste the command you are using to cross-compile and the result of the corresponding go env]
go env
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
[A clear and concise description of what the bug is.]
The time obtained by the CreateTime() method is unstable, which leads to unstable judgment results of the isRunning() method
The result of ctime is not a fixed value
To Reproduce
Expected behavior
[A clear and concise description of what you expected to happen.]
When the process is not restarted, the value of ctime should be fixed
Environment (please complete the following information):
ver
]/etc/os-release
and the result ofuname -a
]sw_vers
anduname -a
freebsd-version -k -r -u
anduname -a
]uname -a
]Additional context
[Cross-compiling? Paste the command you are using to cross-compile and the result of the corresponding
go env
]The text was updated successfully, but these errors were encountered: