| 347 | } |
| 348 | |
| 349 | static struct io_plan *read_fds(struct io_conn *conn, struct subd *sd) |
| 350 | { |
| 351 | if (sd->num_fds_in_read == tal_count(sd->fds_in)) { |
| 352 | size_t i; |
| 353 | |
| 354 | /* Don't trust subd to set it blocking. */ |
| 355 | for (i = 0; i < tal_count(sd->fds_in); i++) |
| 356 | io_fd_block(sd->fds_in[i], true); |
| 357 | return sd_msg_read(conn, sd); |
| 358 | } |
| 359 | return io_recv_fd(conn, &sd->fds_in[sd->num_fds_in_read++], |
| 360 | read_fds, sd); |
| 361 | } |
| 362 | |
| 363 | static struct io_plan *sd_collect_fds(struct io_conn *conn, struct subd *sd, |
| 364 | size_t num_fds) |
no test coverage detected