| 329 | } |
| 330 | |
| 331 | static bool make_tree_pid_path(char path[64]) { |
| 332 | strcpy(path, "/tmp/cbm-subprocess-tree-XXXXXX"); |
| 333 | int fd = cbm_mkstemp(path); |
| 334 | if (fd < 0) { |
| 335 | return false; |
| 336 | } |
| 337 | (void)close(fd); |
| 338 | return unlink(path) == 0; /* child creates it only after both traps are installed */ |
| 339 | } |
| 340 | |
| 341 | static bool wait_for_tree_pids(const char *path, cbm_subprocess_t *process, pid_t *parent_pid, |
| 342 | pid_t *grandchild_pid, int timeout_ms) { |
no test coverage detected