Versions in this module Expand all Collapse all v2 v2.0.1 Apr 3, 2023 v2.0.0 Apr 3, 2023 Changes in this version + func AddSigHandler(handler SigHandler, signals ...os.Signal) + func AddSigHandlerShutdown(handler ...SigHandler) + func IsChild() bool + func Listen() + func MustShell(ctx context.Context, cmd string, out io.Writer, in io.Reader) + func MustShellExec(ctx context.Context, cmd string, environment ...[]string) string + func MustShellRun(ctx context.Context, cmd string) + func PPid() int + func PPidOS() int + func Pid() int + func SearchBinary(file string) string + func SearchBinaryPath(file string) string + func Send(pid int, data []byte, group ...string) error + func SetPPid(ppid int) error + func Shell(ctx context.Context, cmd string, out io.Writer, in io.Reader) error + func ShellExec(ctx context.Context, cmd string, environment ...[]string) (result string, err error) + func ShellRun(ctx context.Context, cmd string) error + func StartTime() time.Time + func Uptime() time.Duration + type Manager struct + func NewManager() *Manager + func (m *Manager) AddProcess(pid int) + func (m *Manager) Clear() + func (m *Manager) GetProcess(pid int) *Process + func (m *Manager) KillAll() error + func (m *Manager) NewProcess(path string, args []string, environment []string) *Process + func (m *Manager) Pids() []int + func (m *Manager) Processes() []*Process + func (m *Manager) RemoveProcess(pid int) + func (m *Manager) Send(data []byte) + func (m *Manager) SendTo(pid int, data []byte) error + func (m *Manager) SignalAll(sig os.Signal) error + func (m *Manager) Size() int + func (m *Manager) WaitAll() + type MsgRequest struct + Data []byte + Group string + ReceiverPid int + SenderPid int + func Receive(group ...string) *MsgRequest + type MsgResponse struct + Code int + Data []byte + Message string + type Process struct + Manager *Manager + PPid int + func NewProcess(path string, args []string, environment ...[]string) *Process + func NewProcessCmd(cmd string, environment ...[]string) *Process + func (p *Process) Kill() (err error) + func (p *Process) Pid() int + func (p *Process) Release() error + func (p *Process) Run(ctx context.Context) error + func (p *Process) Send(data []byte) error + func (p *Process) Signal(sig os.Signal) error + func (p *Process) Start(ctx context.Context) (int, error) + type SigHandler func(sig os.Signal)