Skip to content

fix(darwin): reap DNS cache flush process - #17

Open
kvvipa0028 wants to merge 1 commit into
MetaCubeX:metafrom
kvvipa0028:codex/fix-darwin-dns-cache-process-reaping
Open

fix(darwin): reap DNS cache flush process#17
kvvipa0028 wants to merge 1 commit into
MetaCubeX:metafrom
kvvipa0028:codex/fix-darwin-dns-cache-process-reaping

Conversation

@kvvipa0028

Copy link
Copy Markdown

Why

On Darwin, flushDNSCache starts dscacheutil -flushcache with Cmd.Start and then discards the command. A successfully started os/exec.Cmd must be followed by Wait; otherwise completed children can remain as zombies until the long-running parent exits. Repeated TUN create/close cycles can therefore accumulate zombie dscacheutil processes.

What changed

Use Cmd.Run for the DNS cache flush so the child is waited for and reaped after it exits. The existing best-effort behavior is retained by ignoring the returned error.

Verification

  • make test
  • go test .
  • go vet .
  • git diff --check

@kvvipa0028
kvvipa0028 marked this pull request as ready for review August 24, 2026 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant