| 660 | } |
| 661 | |
| 662 | static void shutdown_global_subdaemons(struct lightningd *ld) |
| 663 | { |
| 664 | /* Let everyone shutdown cleanly. */ |
| 665 | close(ld->hsm_fd); |
| 666 | |
| 667 | /*~ The three "global" daemons, which we shutdown explicitly: we |
| 668 | * give them 10 seconds to exit gracefully before killing them. */ |
| 669 | ld->connectd = subd_shutdown(ld->connectd, 10); |
| 670 | ld->gossip = subd_shutdown(ld->gossip, 10); |
| 671 | ld->hsm = subd_shutdown(ld->hsm, 10); |
| 672 | } |
| 673 | |
| 674 | /*~ The normal advice for daemons is to move into the root directory, so you |
| 675 | * don't prevent unmounting whatever filesystem you happen to start in. |