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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user