Documentation
¶
Overview ¶
Package process wraps up the os.Process interface and also provides os-specific process lookup functions
Package process wraps up the os.Process interface and also provides os-specific process lookup functions
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsProcessExists ¶
os.FindProcess() doesn't work on Linux: https://groups.google.com/forum/#!topic/golang-nuts/hqrp0UHBK9k what we can only do is check whether it exists
Types ¶
type OSProcess ¶
type OSProcess interface { //generic ssm visible fields Pid() int StartTime() time.Time //kill the attached child process Kill() error //wait for the child to finish, if parent dies halfway, the child process is detached and becomes orphan //On Unix system, orphan is not be killed by systemd or upstart by default //On Windows service controller, stop service does not kill orphan by default //TODO confirm MSI Installer does not kill the child process Wait() error }
OSProcess is an abstracted interface of os.Process
type WorkerProcess ¶
impl of OSProcess with os.Process embed
func (*WorkerProcess) Kill ¶
func (p *WorkerProcess) Kill() error
TODO use the kill functions provided in executes package
func (*WorkerProcess) Pid ¶
func (p *WorkerProcess) Pid() int
func (*WorkerProcess) StartTime ¶
func (p *WorkerProcess) StartTime() time.Time
func (*WorkerProcess) Wait ¶
func (p *WorkerProcess) Wait() error
Click to show internal directories.
Click to hide internal directories.