| 251 | } |
| 252 | |
| 253 | static bool start_child(Child *child, const char *root) { |
| 254 | if (child->operation >= EXEC_VE && child->operation <= FAILED_EXEC && |
| 255 | !prepare_receiver(child, root)) |
| 256 | return false; |
| 257 | if (pipe(child->ack) != 0 || pipe(child->gate) != 0 || fflush(NULL) != 0) |
| 258 | return false; |
| 259 | child->pid = fork(); |
| 260 | if (child->pid == 0) |
| 261 | child_body(child); |
| 262 | return child->pid > 0 && close_fd(&child->ack[1]) && close_fd(&child->gate[0]); |
| 263 | } |
| 264 | |
| 265 | static bool ready_child(Child *child, const char *root, const char *stem) { |
| 266 | if (!profile_paths(child, root, stem) || !expect_byte(child->ack[0], 'R')) |
no test coverage detected