- Split platform-specific daemon process configuration into separate files - daemon_unix.go: Uses Setsid for Unix/Linux/macOS - daemon_windows.go: Uses CREATE_NEW_PROCESS_GROUP for Windows - Fixes compilation error: "unknown field Setsid in struct literal" This allows bd.exe to build successfully on Windows while maintaining proper daemon behavior on all platforms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
14 lines
267 B
Go
14 lines
267 B
Go
//go:build unix || linux || darwin
|
|
|
|
package main
|
|
|
|
import (
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
// configureDaemonProcess sets up platform-specific process attributes for daemon
|
|
func configureDaemonProcess(cmd *exec.Cmd) {
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
|
|
}
|