MCPcopy Create free account
hub / github.com/dethcrypto/dethcode / startServer

Function startServer

packages/vscode-host/src/scripts/code-web-deth.js:75–92  ·  view source on GitHub ↗
(runnerArguments)

Source from the content-addressed store, hash-verified

73}
74
75function startServer(runnerArguments) {
76 const env = { ...process.env };
77
78 console.log(`Starting @vscode/test-web: ${testWebLocation} ${runnerArguments.join(' ')}`);
79 const proc = cp.spawn(process.execPath, [testWebLocation, ...runnerArguments], { env, stdio: 'inherit' });
80
81 proc.on('exit', (code) => process.exit(code));
82
83 process.on('exit', () => proc.kill());
84 process.on('SIGINT', () => {
85 proc.kill();
86 process.exit(128 + 2); // https://nodejs.org/docs/v14.16.0/api/process.html#process_signal_events
87 });
88 process.on('SIGTERM', () => {
89 proc.kill();
90 process.exit(128 + 15); // https://nodejs.org/docs/v14.16.0/api/process.html#process_signal_events
91 });
92}
93
94main().catch(err => {
95 console.error(err);

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected