Handle exited OCR descendants in package checks

This commit is contained in:
Storm Dragon committed 2026-11-08 14:00:00 -05:00
1 parent db6b9cc492
commit 5b2b558d2e
4 files changed
+29 -5

No files matched your search

+2 -1
View File
@@ -313,7 +313,8 @@ func TestEngineRetiresDescendantsHoldingPipes(t *testing.T) {
defer poll.Stop()
for {
status, err := os.ReadFile(fmt.Sprintf("/proc/%d/stat", pid))
if errors.Is(err, os.ErrNotExist) {
// A process exiting during the proc read can report ESRCH instead of ENOENT.
if errors.Is(err, os.ErrNotExist) || errors.Is(err, syscall.ESRCH) {
break
}
if err != nil {