Improve logging and context usage

This commit is contained in:
Daniel
2022-10-11 14:51:33 +02:00
parent e5a0f06f97
commit eac91ae627
2 changed files with 8 additions and 5 deletions

View File

@@ -238,7 +238,7 @@ func loadProcess(ctx context.Context, pid int) (*Process, error) {
// Current working directory
// not yet implemented for windows
if runtime.GOOS != "windows" {
process.Cwd, err = pInfo.Cwd()
process.Cwd, err = pInfo.CwdWithContext(ctx)
if err != nil {
log.Warningf("process: failed to get Cwd: %s", err)
}