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

Function waitForShutdownSignal

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

Source from the content-addressed store, hash-verified

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

Callers 2

runForegroundSessionFunction · 0.85
runDaemonSessionFunction · 0.85

Calls 1

syncMethod · 0.65

Tested by

no test coverage detected