MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / waitForShutdownSignal

Function waitForShutdownSignal

apps/cli/src/main.ts:213–222  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

211const shouldEmitDesktopSidecarSentinels = (): boolean => process.env.EXECUTOR_CLIENT === "desktop";
212
213const waitForShutdownSignal = () =>
214 Effect.callback<void, never>((resume) => {
215 const shutdown = () => resume(Effect.void);
216 process.once("SIGINT", shutdown);
217 process.once("SIGTERM", shutdown);
218 return Effect.sync(() => {
219 process.off("SIGINT", shutdown);
220 process.off("SIGTERM", shutdown);
221 });
222 });
223
224// ---------------------------------------------------------------------------
225// Background server management

Callers 2

runForegroundSessionFunction · 0.85
runDaemonSessionFunction · 0.85

Calls 1

syncMethod · 0.65

Tested by

no test coverage detected