Documentation ¶
Overview ¶
Package proc is process utilities
Index ¶
- Variables
- func GroupKill(pid int, signal os.Signal) error
- func KillWithChildren(p *os.Process, interrupt bool) (err error)
- func Pkill(pid int, signal os.Signal) error
- func RunWithTimeout(timeoutSeconds int, cmd *exec.Cmd) error
- func WithTimeout(timeoutSeconds int, todo func() error, onTimeout func() error) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTimedOut = errors.New("child timed out")
ErrTimedOut is an error for child timeout
View Source
var IntTimeout = 3 * time.Second
IntTimeout is the duration to wait before Kill after Int
View Source
var Log = func(keyvals ...interface{}) error { return nil }
Log is discarded by default
Functions ¶
func KillWithChildren ¶
KillWithChildren kills the process and tries to kill its all children (process group)
func RunWithTimeout ¶
RunWithTimeout runs cmd, and kills the child on timeout
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.