Additional Windows CI fixes (bd-99)

- Write PID to daemon.pid when acquiring lock for Windows compatibility
- Increase socket cleanup timeout to 5s for Windows
- Windows can't read locked files, so PID file is required fallback
This commit is contained in:
Steve Yegge
2025-10-24 10:12:59 -07:00
parent 09e51b2184
commit 42480014b3
3 changed files with 13 additions and 9 deletions

View File

@@ -54,6 +54,10 @@ func acquireDaemonLock(beadsDir string, global bool) (*DaemonLock, error) {
fmt.Fprintf(f, "%d\n", os.Getpid())
_ = f.Sync()
// Also write PID file for Windows compatibility (can't read locked files on Windows)
pidFile := filepath.Join(beadsDir, "daemon.pid")
_ = os.WriteFile(pidFile, []byte(fmt.Sprintf("%d\n", os.Getpid())), 0644)
return &DaemonLock{file: f, path: lockPath}, nil
}