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

Function waitForShutdownSignal

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

Source from the content-addressed store, hash-verified

194const shouldEmitDesktopSidecarSentinels = (): boolean => process.env.EXECUTOR_CLIENT === "desktop";
195
196const waitForShutdownSignal = () =>
197 Effect.callback<void, never>((resume) => {
198 const shutdown = () => resume(Effect.void);
199 process.once("SIGINT", shutdown);
200 process.once("SIGTERM", shutdown);
201 return Effect.sync(() => {
202 process.off("SIGINT", shutdown);
203 process.off("SIGTERM", shutdown);
204 });
205 });
206
207// ---------------------------------------------------------------------------
208// Background server management

Callers 2

runForegroundSessionFunction · 0.85
runDaemonSessionFunction · 0.85

Calls 1

syncMethod · 0.80

Tested by

no test coverage detected