()
| 173 | } |
| 174 | |
| 175 | func (m runModel) pid() int { |
| 176 | m.st.mu.Lock() |
| 177 | defer m.st.mu.Unlock() |
| 178 | if m.st.cmd == nil || m.st.cmd.Process == nil { |
| 179 | return 0 |
| 180 | } |
| 181 | return m.st.cmd.Process.Pid |
| 182 | } |
| 183 | |
| 184 | // start spawns `snix start -c CONFIG` and returns a tea.Cmd that pumps the |
| 185 | // subprocess's output into the model's log viewport. |