()
| 60 | } |
| 61 | |
| 62 | func (w *WSLProcessController) Start() error { |
| 63 | w.lock.Lock() |
| 64 | defer w.lock.Unlock() |
| 65 | |
| 66 | if w.started { |
| 67 | return fmt.Errorf("command already started") |
| 68 | } |
| 69 | |
| 70 | if err := w.cmd.Start(); err != nil { |
| 71 | return fmt.Errorf("failed to start command: %w", err) |
| 72 | } |
| 73 | |
| 74 | w.started = true |
| 75 | return nil |
| 76 | } |
| 77 | |
| 78 | func (w *WSLProcessController) Wait() error { |
| 79 | w.once.Do(func() { |