| 794 | } |
| 795 | |
| 796 | struct subd *new_global_subd(struct lightningd *ld, |
| 797 | const char *name, |
| 798 | const char *(*msgname)(int msgtype), |
| 799 | unsigned int (*msgcb)(struct subd *, const u8 *, |
| 800 | const int *fds), |
| 801 | ...) |
| 802 | { |
| 803 | va_list ap; |
| 804 | struct subd *sd; |
| 805 | |
| 806 | va_start(ap, msgcb); |
| 807 | sd = new_subd(ld, ld, name, NULL, NULL, NULL, false, |
| 808 | msgname, msgcb, NULL, NULL, &ap); |
| 809 | va_end(ap); |
| 810 | |
| 811 | sd->must_not_exit = true; |
| 812 | return sd; |
| 813 | } |
| 814 | |
| 815 | struct subd *new_channel_subd_(const tal_t *ctx, |
| 816 | struct lightningd *ld, |
no test coverage detected