Handle exited OCR descendants in package checks
This commit is contained in:
1 parent
db6b9cc492
commit
5b2b558d2e
4 files changed
+29
-5
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user