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. */
| 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. */ |
| 693 | static 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 | |
| 703 | static int spawn_ignoring_tree(const char *pid_path, int quiet_timeout_ms, int cancel_grace_ms, |
| 704 | cbm_subprocess_t **out) { |