MCPcopy Index your code
hub / github.com/DarthSim/overmind / ExitCode

Method ExitCode

start/tmux.go:203–220  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201}
202
203func (t *tmuxClient) ExitCode() (status int) {
204 buf := new(bytes.Buffer)
205
206 cmd := exec.Command("tmux", "-L", t.Socket, "list-windows", "-t", t.Session, "-F", "#{pane_dead_status}")
207 cmd.Stdout = buf
208 cmd.Stderr = os.Stderr
209 cmd.Run()
210
211 scanner := bufio.NewScanner(buf)
212
213 for scanner.Scan() {
214 if s, err := strconv.Atoi(scanner.Text()); err == nil && s > status {
215 status = s
216 }
217 }
218
219 return
220}
221
222func (t *tmuxClient) Shutdown() {
223 t.shutdown = true

Callers 1

RunMethod · 0.80

Calls 1

RunMethod · 0.45

Tested by

no test coverage detected