fix: Add Windows build support for daemon command
- 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>
This commit is contained in:
@@ -262,7 +262,7 @@ func startDaemon(interval time.Duration, autoCommit, autoPush bool, logFile, pid
|
||||
|
||||
cmd := exec.Command(exe, args...)
|
||||
cmd.Env = append(os.Environ(), "BD_DAEMON_FOREGROUND=1")
|
||||
cmd.SysProcAttr = &syscall.SysProcAttr{Setsid: true}
|
||||
configureDaemonProcess(cmd)
|
||||
|
||||
devNull, err := os.OpenFile(os.DevNull, os.O_RDWR, 0)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user