()
| 336 | |
| 337 | // Kills the running process and it's child processes |
| 338 | _killProcess() { |
| 339 | if (!this.proc) { |
| 340 | throw new Error("Unexpected: `this.proc` undefined when calling _killProcess"); |
| 341 | } |
| 342 | |
| 343 | if (process.platform === "win32") { |
| 344 | // looks like in Windows `this.proc.kill()` doesn't kill child |
| 345 | // processes. |
| 346 | execFileSync("taskkill", ["/pid", this.proc.pid, '/f', '/t']); |
| 347 | } else { |
| 348 | this.proc.kill(); |
| 349 | } |
| 350 | } |
| 351 | |
| 352 | // If the fakeMongo option was set, sent a command to the stub |
| 353 | // mongod. Available commands currently are: |
no test coverage detected