MCPcopy Create free account
hub / github.com/Fibi66/FeiControl / stopChild

Function stopChild

scripts/dev-server.cjs:133–147  ·  view source on GitHub ↗
(child, signal = 'SIGTERM')

Source from the content-addressed store, hash-verified

131}
132
133function stopChild(child, signal = 'SIGTERM') {
134 return new Promise((resolve) => {
135 if (child.exitCode !== null || child.signalCode !== null) {
136 resolve();
137 return;
138 }
139
140 const timeout = setTimeout(resolve, 5_000);
141 child.once('exit', () => {
142 clearTimeout(timeout);
143 resolve();
144 });
145 child.kill(signal);
146 });
147}
148
149function setNoStoreHeaders(response) {
150 response.setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0');

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected