pidfile

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

README

pidfile

pidfiles for golang

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProcessRunning = errors.New("process is already running")
	ErrFileStale      = errors.New("pidfile exists but process is not running")
	ErrFileInvalid    = errors.New("pidfile has invalid contents")
)

Functions

func PidIsRunning

func PidIsRunning(filename string) (int, bool, error)

func Remove

func Remove(filename string) error

Remove a pidfile

func Write

func Write(filename string) error

Write writes a pidfile, returning an error if the process is already running or pidfile is orphaned

func WriteControl

func WriteControl(filename string, pid int, overwrite bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL