Documentation
¶
Index ¶
- func DetachProcess(cmd *exec.Cmd)
- func HideWindow(_ *exec.Cmd)
- func LockFile(f *os.File) error
- func LooksAbsolutePath(path string) bool
- func NormalizePathForCompare(p string) string
- func SafeRename(src, dst string) error
- func SetProcessGroup(cmd *exec.Cmd)
- func TermSignals() []os.Signal
- func UnlockFile(f *os.File) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetachProcess ¶
DetachProcess configures cmd to run in a new session, detached from the parent. The child survives the parent exiting.
func HideWindow ¶ added in v0.3.2
HideWindow is a no-op on Unix. On Windows it suppresses console window creation for subprocess invocations from detached workers.
func LooksAbsolutePath ¶
LooksAbsolutePath returns true if path looks like an absolute path on any OS. Unlike filepath.IsAbs, this recognizes POSIX-style absolute paths (/workspace/...) even on Windows, which is needed for file paths from agent payloads that may use POSIX conventions regardless of host OS.
func NormalizePathForCompare ¶ added in v0.3.2
NormalizePathForCompare returns a path suitable for case-aware prefix matching. On Windows, paths are lowercased because the filesystem is case-insensitive (C:\Users and c:\Users are the same path). On macOS/Linux, the path is returned unchanged.
func SafeRename ¶
SafeRename moves src to dst, replacing dst if it exists. On Windows, removes dst first (os.Rename cannot overwrite) and retries only on transient sharing-violation errors from antivirus or search indexing. Non-transient errors fail immediately. This is NOT atomic on Windows.
func SetProcessGroup ¶
SetProcessGroup configures cmd to run in a new process group.
func TermSignals ¶
TermSignals returns the signals to listen for graceful shutdown.
Types ¶
This section is empty.