package
1.1.3
Repository: https://github.com/infinitbyte/framework.git
Documentation: pkg.go.dev

# Functions

CreatePidFile opens the named file, applies exclusive lock and writes current process id to file.
GetFdName returns file name for given descriptor.
NewLockFile returns a new LockFile with the given File.
OpenLockFile opens the named file with flags os.O_RDWR|os.O_CREATE and specified perm.
ReadPidFile reads process id from file with give name and returns pid.
ServeSignals calls handlers for system signals.
SetSigHandler sets handler for the given signals.
WasReborn returns true in child process (daemon) and false in parent process.

# Constants

FilePerm set default file permissions for log and pid files.
Mark of daemon process - system environment variable _GO_DAEMON=1.
Mark of daemon process - system environment variable _GO_DAEMON=1.

# Variables

ErrStop should be returned signal handler function for termination of handling signals.
ErrWouldBlock indicates on locking pid-file by another process.

# Structs

A Context describes daemon context.
LockFile wraps *os.File and provide functions for locking of files.

# Type aliases

SignalHandlerFunc is the interface for signal handler functions.