()
| 132 | } |
| 133 | |
| 134 | dispose(): void { |
| 135 | if (this.proc) { |
| 136 | try { |
| 137 | this.proc.kill(); |
| 138 | } catch { |
| 139 | // Already gone — fine. |
| 140 | } |
| 141 | this.proc = undefined; |
| 142 | } |
| 143 | if (this._status !== "exited" && this._status !== "failed") { |
| 144 | this._status = "stopped"; |
| 145 | } |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | function delay(ms: number): Promise<void> { |