| 295 | } |
| 296 | |
| 297 | static void dualopen_shutdown(struct state *state) |
| 298 | { |
| 299 | u8 *msg = towire_dualopend_shutdown_complete(state); |
| 300 | |
| 301 | wire_sync_write(REQ_FD, msg); |
| 302 | per_peer_state_fdpass_send(REQ_FD, state->pps); |
| 303 | status_debug("Sent %s with fds", |
| 304 | dualopend_wire_name(fromwire_peektype(msg))); |
| 305 | |
| 306 | /* Give master a chance to pass the fd along */ |
| 307 | sleep(1); |
| 308 | |
| 309 | /* This frees the entire tal tree. */ |
| 310 | tal_free(state); |
| 311 | daemon_shutdown(); |
| 312 | exit(0); |
| 313 | } |
| 314 | |
| 315 | static bool shutdown_complete(const struct state *state) |
| 316 | { |
no test coverage detected