MCPcopy Index your code
hub / github.com/coder/envbox / Run

Method Run

background/process.go:71–80  ·  view source on GitHub ↗

Run runs the command and waits for it to exit. It is a convenience function that combines both Start() and Wait().

()

Source from the content-addressed store, hash-verified

69// Run runs the command and waits for it to exit. It is a convenience
70// function that combines both Start() and Wait().
71func (d *Process) Run() <-chan error {
72 err := d.Start()
73 if err != nil {
74 ch := make(chan error, 1)
75 ch <- err
76 return ch
77 }
78
79 return d.Wait()
80}
81
82// Restart kill the running process and reruns the command with the updated
83// cmd and args.

Callers 1

TestJSONLogFunction · 0.45

Calls 2

StartMethod · 0.95
WaitMethod · 0.95

Tested by 1

TestJSONLogFunction · 0.36