carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1//go:build windows
2
3package host
4
5import (
6 "errors"
7 "os"
8)
9
10// lockFileEx refuses on Windows rather than pretending to lock. Restart
11// passes are root units on a Linux box; the Windows build exists only so the
12// carlos CLI compiles for workstation use. Refusing is also the SAFE failure
13// here: lockRestartMarks's caller dispatches nothing when the lock cannot be
14// taken (restart.go's pass doc), so an unlockable platform cycles no
15// processes — whereas a no-op lock would claim serialization it does not
16// provide.
17func lockFileEx(f *os.File) error {
18 return errors.New("restart-mark locking is box-side (linux) only")
19}
20
21func unlockFile(f *os.File) {}
22