Return true if called with a recognized subdaemon e.g. "hsmd" */
| 400 | |
| 401 | /* Return true if called with a recognized subdaemon e.g. "hsmd" */ |
| 402 | bool is_subdaemon(const char *sdname) |
| 403 | { |
| 404 | for (size_t i = 0; i < ARRAY_SIZE(subdaemons); i++) |
| 405 | /* Skip the "lightning_" prefix in the table */ |
| 406 | if (streq(sdname, subdaemons[i] + strlen("lightning_"))) |
| 407 | return true; |
| 408 | return false; |
| 409 | } |
| 410 | |
| 411 | static void destroy_alt_subdaemons(struct lightningd *ld) |
| 412 | { |