Skip to content

Commit

Permalink
Merge pull request #12 from FortnoxAB/reapzombies
Browse files Browse the repository at this point in the history
Try to sleep a bit to avoid err: waitid: no child processes
  • Loading branch information
jonaz authored Nov 29, 2024
2 parents 5424751 + 5bdb272 commit 8b73301
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func ZombieReaper() {
for range signals {
for {
var wstatus syscall.WaitStatus
time.Sleep(1 * time.Second)
pid, err := syscall.Wait4(-1, &wstatus, 0, nil)
if errors.Is(err, syscall.ECHILD) {
break
Expand Down

0 comments on commit 8b73301

Please sign in to comment.