Issue
Command health checks attach logger writers to stdout and stderr. os/exec therefore copies through pipes, and Cmd.Run can remain blocked after the health-check process exits if a descendant inherited either pipe.
Proposed fix
A health-check attempt should complete within a bounded interval after its process exits. Setting a small Cmd.WaitDelay on command health checks prevents descendants from delaying service startup indefinitely.
A regression test can use a health-check command that starts a background child inheriting stdout, then exits.
Issue
Command health checks attach logger writers to stdout and stderr. os/exec therefore copies through pipes, and Cmd.Run can remain blocked after the health-check process exits if a descendant inherited either pipe.
Proposed fix
A health-check attempt should complete within a bounded interval after its process exits. Setting a small Cmd.WaitDelay on command health checks prevents descendants from delaying service startup indefinitely.
A regression test can use a health-check command that starts a background child inheriting stdout, then exits.