Struct pid_file::PidFile[][src]

pub struct PidFile(pub(crate) *mut pidfh);
Expand description

An open PID file.

A process that manages to construct this type holds an exclusive lock on the PID file.

Dropping the type will attempt to call remove, but any errors will be suppressed. Call remove manually if you need to handle PID file removal errors.

Tuple Fields

0: *mut pidfh

Implementations

Attempts to open and lock the specified PID file.

If the file is already locked by another process, it returns Error::AlreadyRunning.

Like open, but opens the file with the specified permissions rather than 0600.

Closes the PID file and removes it from the filesystem.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more