MCPcopy Index your code
hub / github.com/getsentry/XcodeBuildMCP / startDaemonForeground

Function startDaemonForeground

src/cli/daemon-control.ts:241–260  ·  view source on GitHub ↗
(opts: StartDaemonForegroundOptions)

Source from the content-addressed store, hash-verified

239 * Used for debugging. The function returns when the daemon exits.
240 */
241export function startDaemonForeground(opts: StartDaemonForegroundOptions): Promise<number> {
242 const daemonPath = getDaemonExecutablePath();
243
244 return new Promise<number>((resolve) => {
245 const child = spawn(process.execPath, [daemonPath], {
246 stdio: 'inherit',
247 cwd: opts.workspaceRoot,
248 env: {
249 ...process.env,
250 ...opts.env,
251 XCODEBUILDMCP_SOCKET: opts.socketPath,
252 XCODEBUILDCLI_SOCKET: opts.socketPath,
253 },
254 });
255
256 child.on('exit', (code) => {
257 resolve(code ?? 0);
258 });
259 });
260}

Callers 1

handleStartFunction · 0.90

Calls 2

getDaemonExecutablePathFunction · 0.85
resolveFunction · 0.85

Tested by

no test coverage detected