| 230 | } |
| 231 | |
| 232 | static bool held_protocol(Child *child) { |
| 233 | if (child->operation >= EXEC_VE && child->operation <= EXEC_L) { |
| 234 | if (!expect_byte(child->ack[0], 'E')) |
| 235 | return false; |
| 236 | int marker = marker_present(child); |
| 237 | return marker >= 0 && note(child, "exec_held", marker, 0) && send_byte(child->gate[1], 'G'); |
| 238 | } |
| 239 | if (child->operation == FAILED_EXEC) { |
| 240 | const char *stages[] = {"execve_failed", "execv_failed", "execvp_failed", "execl_failed"}; |
| 241 | for (int i = 0; i < 4; i++) { |
| 242 | if (!expect_byte(child->ack[0], (char)('0' + i))) |
| 243 | return false; |
| 244 | int marker = marker_present(child); |
| 245 | if (marker < 0 || !note(child, stages[i], marker, ENOENT) || |
| 246 | !send_byte(child->gate[1], 'G')) |
| 247 | return false; |
| 248 | } |
| 249 | } |
| 250 | return true; |
| 251 | } |
| 252 | |
| 253 | static bool start_child(Child *child, const char *root) { |
| 254 | if (child->operation >= EXEC_VE && child->operation <= FAILED_EXEC && |
no test coverage detected