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