process

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfAlreadyRunning

func CheckIfAlreadyRunning() (bool, ps.Process)

CheckIfAlreadyRunning check for pid file (location is given by pidFilePath parameter) file existence. If exist, it'll get saved pid and check if the process is still running. Returns a boolean notifying if the process is running and the process in question if it exists

func DeletePidFile

func DeletePidFile()

DeletePidFile delete pid file if exists

func DumpProcessPidToFile

func DumpProcessPidToFile()

DumpProcessPidToFile get program pid and save it to pidFilePath file

func Init

func Init(path string)

Init take into parameter pid file path and update associated process package variable

func TerminateRunningInstance

func TerminateRunningInstance() error

TerminateRunningInstance check if the pid stored in the pid file is running and, if yes, terminate it.

Types

This section is empty.

Jump to

Keyboard shortcuts

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