Download this file
| 1 | package mac |
| 2 | |
| 3 | import ( |
| 4 | "os/exec" |
| 5 | |
| 6 | "amadan.net/oficina/equipo/internal/runner/mac/proc" |
| 7 | ) |
| 8 | |
| 9 | // The runner user's process table, the runner's own helpers and what an |
| 10 | // operation may have left live in package proc; these names keep the |
| 11 | // Mac runner's callers on this package. |
| 12 | type ( |
| 13 | ProcID = proc.ID |
| 14 | ProcInfo = proc.Info |
| 15 | Procs = proc.Table |
| 16 | Own = proc.Own |
| 17 | Proc = proc.Proc |
| 18 | span = proc.Span |
| 19 | scope = proc.Scope |
| 20 | ) |
| 21 | |
| 22 | // ErrNoSweep refuses a runner-user sweep on a table that may not drive |
| 23 | // one. |
| 24 | var ErrNoSweep = proc.ErrNoSweep |
| 25 | |
| 26 | var ( |
| 27 | platformProcs = proc.Platform |
| 28 | runnerOwn = proc.Runner |
| 29 | ) |
| 30 | |
| 31 | // StartOwn starts cmd as the runner's own helper: a turn's sweep spares |
| 32 | // it, by identity (proc.Start). |
| 33 | func StartOwn(cmd *exec.Cmd) error { return proc.Start(cmd) } |
| 34 | |
| 35 | // MachineProcs is the table a Mac's turns sweep with; nil off a Mac. |
| 36 | func MachineProcs() Procs { return proc.Machine() } |
| 37 | |
| 38 | // ParseMarked reads ps -E output for attempt's marker (proc.ParseMarked). |
| 39 | func ParseMarked(out, attempt string, self int) []Proc { return proc.ParseMarked(out, attempt, self) } |
| 40 | |
| 41 | func newScope(p Procs, markers []string, before []ProcID) *scope { |
| 42 | return proc.NewScope(p, markers, before) |
| 43 | } |
| 44 | |