Documentation
¶
Index ¶
- Variables
- func Add(desc string, cmd *exec.Cmd) int64
- func Exec(desc, cmdName string, args ...string) (string, string, error)
- func ExecDir(timeout time.Duration, dir, desc, cmdName string, args ...string) (string, string, error)
- func ExecTimeout(timeout time.Duration, desc, cmdName string, args ...string) (string, string, error)
- func Kill(pid int64) error
- func Remove(pid int64)
- type Process
Constants ¶
This section is empty.
Variables ¶
Common timeout.
View Source
var (
Processes []*Process
)
List of existing processes.
Functions ¶
func Add ¶
Add adds a existing process and returns its PID.
func Exec ¶
Exec starts executing a command, it records its process and has default timeout.
func ExecDir ¶
func ExecDir(timeout time.Duration, dir, desc, cmdName string, args ...string) (string, string, error)
Exec starts executing a command in given path, it records its process and timeout.
Types ¶
Source Files
¶
- manager.go
Click to show internal directories.
Click to hide internal directories.