MCPcopy Create free account
hub / github.com/microsoft/vscode-languageserver-node / runTimer

Function runTimer

server/src/main.ts:77–93  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

75function setupExitTimer(): void {
76 const argName = '--clientProcessId';
77 function runTimer(value: string): void {
78 try {
79 let processId = parseInt(value);
80 if (!isNaN(processId)) {
81 exitTimer = setInterval(() => {
82 try {
83 process.kill(processId, <any>0);
84 } catch (ex) {
85 // Parent process doesn't exist anymore. Exit the server.
86 process.exit(shutdownReceived ? 0 : 1);
87 }
88 }, 3000);
89 }
90 } catch (e) {
91 // Ignore errors;
92 }
93 }
94
95 for (let i = 2; i < process.argv.length; i++) {
96 let arg = process.argv[i];

Callers 1

setupExitTimerFunction · 0.85

Calls 1

exitMethod · 0.80

Tested by

no test coverage detected