Documentation ¶
Overview ¶
Package pidfile provides structure and helper functions to create and remove PID file. A PID file is usually a file used to store the process ID of a running process.
Index ¶
Constants ¶
View Source
const MaxTimeout = 43200
Variables ¶
View Source
var ( ErrProcessRunning = errors.New("process is running") ErrFileStale = errors.New("pidfile exists but process is not running") ErrFileInvalid = errors.New("pidfile has invalid contents") )
Common error for pidfile package
Functions ¶
func DropPrivilege ¶
func RegisterFswatcher ¶
func RegisterFswatcher(filename string, callback func())
Types ¶
type PIDFile ¶
type PIDFile struct {
// contains filtered or unexported fields
}
PIDFile is a file used to store the process ID of a running process.
func NewPidFile ¶
New creates a PIDfile using the specified path.
Click to show internal directories.
Click to hide internal directories.