process

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package process Provide some process handle util functions

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(pid int) bool

Exists check process running by given pid

func PID added in v0.3.6

func PID() int

PID get process ID

Types

type PidFile added in v0.5.6

type PidFile struct {
	// contains filtered or unexported fields
}

PidFile struct

func NewPidFile added in v0.5.6

func NewPidFile(file string) *PidFile

NewPidFile instance

func (*PidFile) Exists added in v0.5.6

func (pf *PidFile) Exists() bool

Exists of th pid file

func (*PidFile) File added in v0.5.6

func (pf *PidFile) File() string

File path

func (*PidFile) PID added in v0.5.6

func (pf *PidFile) PID() int

PID value

func (*PidFile) Save added in v0.5.6

func (pf *PidFile) Save() error

Save PID value to file

func (*PidFile) SetPID added in v0.5.6

func (pf *PidFile) SetPID(val int) int

SetPID value

func (*PidFile) String added in v0.5.6

func (pf *PidFile) String() string

String PID value string

Jump to

Keyboard shortcuts

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