Documentation ¶
Overview ¶
Package lockfile provides methods to associate process ids (PIDs) with a file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateLockfile ¶
CreateLockfile associates the provided file with the process ID of the caller.
file should not contain any useful content because CreateLockfile may delete and recreate it.
Only one active process can be associated with a file at a time. Thus, if another active process is currently associated with file, then CreateLockfile will return an error.
func RemoveLockfile ¶
func RemoveLockfile(file string)
RemoveLockfile removes file and the corresponding lock on it.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.