MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / client_start_parent_watchdog

Function client_start_parent_watchdog

src/main.c:512–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

510}
511
512static bool client_start_parent_watchdog(pid_t initial_ppid) {
513 if (initial_ppid <= 1) {
514 return true;
515 }
516 static parent_watchdog_config_t client_config;
517 client_config.initial_ppid = initial_ppid;
518 client_config.kill_worker_group = false;
519 client_config.exit_on_parent_death = true;
520 cbm_thread_t watchdog;
521 if (cbm_thread_create(&watchdog, PARENT_WATCHDOG_STACK_SIZE, parent_watchdog_thread,
522 &client_config) != 0) {
523 return false;
524 }
525 if (cbm_thread_detach(&watchdog) != 0) {
526 atomic_store(&g_shutdown, 1);
527 (void)cbm_thread_join(&watchdog);
528 return false;
529 }
530 return true;
531}
532#endif
533
534/* ── CLI mode ───────────────────────────────────────────────────── */

Callers 1

mainFunction · 0.85

Calls 3

cbm_thread_createFunction · 0.85
cbm_thread_detachFunction · 0.85
cbm_thread_joinFunction · 0.85

Tested by

no test coverage detected