| 858 | } |
| 859 | |
| 860 | struct subd_req *subd_req_(const tal_t *ctx, |
| 861 | struct subd *sd, |
| 862 | const u8 *msg_out, |
| 863 | int fd_out, size_t num_fds_in, |
| 864 | void (*replycb)(struct subd *, const u8 *, const int *, void *), |
| 865 | void *replycb_data TAKES) |
| 866 | { |
| 867 | /* Grab type now in case msg_out is taken() */ |
| 868 | int type = fromwire_peektype(msg_out); |
| 869 | |
| 870 | subd_send_msg(sd, msg_out); |
| 871 | if (fd_out >= 0) |
| 872 | subd_send_fd(sd, fd_out); |
| 873 | |
| 874 | return add_req(ctx, sd, type, num_fds_in, replycb, replycb_data); |
| 875 | } |
| 876 | |
| 877 | /* SIGALRM terminates by default: we just want it to interrupt waitpid(), |
| 878 | * which is implied by "handling" it. */ |
nothing calls this directly
no test coverage detected