package mac import ( "os/exec" "amadan.net/oficina/equipo/internal/runner/mac/proc" ) // The runner user's process table, the runner's own helpers and what an // operation may have left live in package proc; these names keep the // Mac runner's callers on this package. type ( ProcID = proc.ID ProcInfo = proc.Info Procs = proc.Table Own = proc.Own Proc = proc.Proc span = proc.Span scope = proc.Scope ) // ErrNoSweep refuses a runner-user sweep on a table that may not drive // one. var ErrNoSweep = proc.ErrNoSweep var ( platformProcs = proc.Platform runnerOwn = proc.Runner ) // StartOwn starts cmd as the runner's own helper: a turn's sweep spares // it, by identity (proc.Start). func StartOwn(cmd *exec.Cmd) error { return proc.Start(cmd) } // MachineProcs is the table a Mac's turns sweep with; nil off a Mac. func MachineProcs() Procs { return proc.Machine() } // ParseMarked reads ps -E output for attempt's marker (proc.ParseMarked). func ParseMarked(out, attempt string, self int) []Proc { return proc.ParseMarked(out, attempt, self) } func newScope(p Procs, markers []string, before []ProcID) *scope { return proc.NewScope(p, markers, before) }