MCPcopy
hub / github.com/microsoft/playwright / killProcessAndCleanup

Function killProcessAndCleanup

packages/utils/processLauncher.ts:254–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

252 }
253
254 function killProcessAndCleanup() {
255 killProcess();
256 options.log(`[pid=${spawnedProcess.pid || 'N/A'}] starting temporary directories cleanup`);
257 for (const dir of options.tempDirectories) {
258 try {
259 fs.rmSync(dir, { force: true, recursive: true, maxRetries: 5 });
260 } catch (e) {
261 options.log(`[pid=${spawnedProcess.pid || 'N/A'}] exception while removing ${dir}: ${e}`);
262 }
263 }
264 options.log(`[pid=${spawnedProcess.pid || 'N/A'}] finished temporary directories cleanup`);
265 }
266
267 function killAndWait() {
268 killProcess();

Callers

nothing calls this directly

Calls 2

killProcessFunction · 0.85
logMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…