Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/20250730095330.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:bug: `proc` In process find, ignore processes that have stopped between listing and matching
4 changes: 2 additions & 2 deletions utils/proc/find/find_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ func checkProcessMatch(ctx context.Context, fs filesystem.FS, re *regexp.Regexp,

data, err := fs.ReadFile(procEntry)
if err != nil {
if commonerrors.CorrespondTo(err, "no bytes were read") {
if commonerrors.CorrespondTo(err, "no bytes were read", "no such file or directory") {
err = nil
return // ignore special descriptors since our cmdline will have content (we still have to check since all files in proc have size zero)
return // ignore special descriptors since our cmdline will have content (we still have to check since all files in proc have size zero) as well as processes that have stopped since the listing occurred
}
err = commonerrors.WrapErrorf(commonerrors.ErrUnexpected, err, "could not read proc entry '%v'", procEntry)
return
Expand Down
Loading