| 313 | } |
| 314 | |
| 315 | static void dualopen_shutdown(struct state *state) |
| 316 | { |
| 317 | u8 *msg = towire_dualopend_shutdown_complete(state); |
| 318 | |
| 319 | wire_sync_write(REQ_FD, msg); |
| 320 | per_peer_state_fdpass_send(REQ_FD, state->pps); |
| 321 | status_debug("Sent %s with fds", |
| 322 | dualopend_wire_name(fromwire_peektype(msg))); |
| 323 | |
| 324 | /* Give master a chance to pass the fd along */ |
| 325 | sleep(1); |
| 326 | |
| 327 | /* This frees the entire tal tree. */ |
| 328 | tal_free(state); |
| 329 | daemon_shutdown(); |
| 330 | exit(0); |
| 331 | } |
| 332 | |
| 333 | static bool shutdown_complete(const struct state *state) |
| 334 | { |
no test coverage detected