From 9e9db629545f3fb2051b8b4330b4ac0d8dba93cf Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Mon, 10 Nov 2025 10:22:03 -0800 Subject: [PATCH] Fix daemon exiting after 5s on macOS due to PID 1 parent monitoring (GH #278) Amp-Thread-ID: https://ampcode.com/threads/T-87e6732c-f7bf-4e8d-9ebc-f778ac6f0c40 Co-authored-by: Amp --- cmd/bd/daemon_server.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/bd/daemon_server.go b/cmd/bd/daemon_server.go index dc340edc..b686b788 100644 --- a/cmd/bd/daemon_server.go +++ b/cmd/bd/daemon_server.go @@ -83,8 +83,9 @@ func checkParentProcessAlive(parentPID int) bool { } if parentPID == 1 { - // Adopted by init - parent died - return false + // Adopted by init/launchd - this is normal for detached daemons on macOS/Linux + // Don't treat this as parent death + return true } // Check if parent process is running