MCPcopy Create free account
hub / github.com/vercel/vercel / nukeProcessTree

Function nukeProcessTree

packages/cli/test/dev/utils.ts:766–780  ·  view source on GitHub ↗
(pid: number, signal?: string)

Source from the content-addressed store, hash-verified

764}
765
766export async function nukeProcessTree(pid: number, signal?: string) {
767 if (process.platform === 'win32') {
768 spawnSync('taskkill', ['/pid', pid.toString(), '/T', '/F'], {
769 stdio: 'inherit',
770 });
771 return;
772 }
773
774 const pids = await ps(pid, {
775 [pid]: [],
776 });
777
778 console.log(`Nuking pids: ${Object.keys(pids).join(', ')}`);
779 await Promise.all(Object.keys(pids).map(pid => nukePID(Number(pid), signal)));
780}
781
782beforeEach(() => {
783 port = ++port;

Callers 4

withLocalDevFunction · 0.90
testFixtureFunction · 0.85
testFixtureStdioFunction · 0.85
utils.tsFile · 0.85

Calls 6

psFunction · 0.85
nukePIDFunction · 0.85
toStringMethod · 0.45
logMethod · 0.45
joinMethod · 0.45
keysMethod · 0.45

Tested by 1

withLocalDevFunction · 0.72