Documentation
¶
Overview ¶
Package pidfile records a process id in a file, for a service manager or a command line that signals the process later.
Index ¶
Constants ¶
View Source
const Mode = 0o644
Mode is the mode a pidfile is created with, before the umask.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Pidfile ¶
type Pidfile struct {
// contains filtered or unexported fields
}
Pidfile is the file a process records its own id in.
The zero value is disabled, which is what an empty path asks for, and every method on it is then a no-op. A pidfile is a record and not a lock: Write overwrites whatever was there, and Remove gives the file up only while it still holds the id Write put in it.
Click to show internal directories.
Click to hide internal directories.