MCPcopy Create free account
hub / github.com/ElementsProject/lightning / opt_set_crash_timeout

Function opt_set_crash_timeout

lightningd/options.c:758–776  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758static char *opt_set_crash_timeout(const char *arg, struct lightningd *ld)
759{
760 struct sigaction act;
761 u32 time;
762 char *errstr = opt_set_u32(arg, &time);
763 if (errstr)
764 return errstr;
765
766 /* In case we're *REALLY* stuck, use alarm() */
767 memset(&act, 0, sizeof(act));
768 act.sa_handler = handle_alarm;
769 act.sa_flags = 0;
770
771 if (sigaction(SIGALRM, &act, NULL) != 0)
772 err(1, "Setting up SIGARLM handler");
773
774 alarm(time);
775 return NULL;
776}
777
778static void dev_register_opts(struct lightningd *ld)
779{

Callers

nothing calls this directly

Calls 3

opt_set_u32Function · 0.85
errFunction · 0.85
sigactionClass · 0.70

Tested by

no test coverage detected