(child, signal)
| 178 | } |
| 179 | |
| 180 | export async function terminatePosixProcessGroup(child, signal) { |
| 181 | const processGroupId = -child.pid; |
| 182 | if (!signalPosixProcessGroup(child, processGroupId, signal)) return; |
| 183 | try { |
| 184 | await waitForPosixProcessGroupExit(processGroupId); |
| 185 | return; |
| 186 | } catch (error) { |
| 187 | if ( |
| 188 | !(error instanceof PosixProcessGroupExitTimeout) || |
| 189 | signal === "SIGKILL" |
| 190 | ) { |
| 191 | throw error; |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | if (!signalPosixProcessGroup(child, processGroupId, "SIGKILL")) return; |
| 196 | await waitForPosixProcessGroupExit(processGroupId); |
| 197 | } |
| 198 | |
| 199 | export async function spawnDevServer( |
| 200 | command, |
no test coverage detected