MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / killExistingServer

Function killExistingServer

Example/e2etest/e2e/globalSetup.ts:51–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49const pidFile = path.join(artifactsRoot, '.server.pid');
50
51function killExistingServer() {
52 if (!fs.existsSync(pidFile)) {
53 return;
54 }
55
56 try {
57 const pid = Number(fs.readFileSync(pidFile, 'utf8').trim());
58 if (pid > 0) {
59 process.kill(pid, 'SIGTERM');
60 }
61 } catch {
62 // ignore stale pid
63 }
64}
65
66function runPrepareScript() {
67 const prepareScript = path.join(

Callers 1

globalSetupFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected