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

Function force_probe_cleanup

tests/test_subprocess.c:693–701  ·  view source on GitHub ↗

Best-effort cleanup for a failing implementation, so a red tree test does not * leave its TERM-ignoring probes behind for later tests. The production API must * still report terminal itself; callers never use this escape hatch. */

Source from the content-addressed store, hash-verified

691 * leave its TERM-ignoring probes behind for later tests. The production API must
692 * still report terminal itself; callers never use this escape hatch. */
693static void force_probe_cleanup(pid_t parent_pid, pid_t grandchild_pid) {
694 if (parent_pid > 1) {
695 (void)kill(-parent_pid, SIGKILL);
696 (void)kill(parent_pid, SIGKILL);
697 }
698 if (grandchild_pid > 1) {
699 (void)kill(grandchild_pid, SIGKILL);
700 }
701}
702
703static int spawn_ignoring_tree(const char *pid_path, int quiet_timeout_ms, int cancel_grace_ms,
704 cbm_subprocess_t **out) {

Callers 1

test_subprocess.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected