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

Function subdaemon_setup

common/subdaemon.c:21–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21bool subdaemon_setup(int argc, char *argv[])
22{
23 bool developer;
24
25 if (argc == 2 && streq(argv[1], "--version")) {
26 printf("%s\n", version());
27 exit(0);
28 }
29
30 for (int i = 1; i < argc; i++) {
31 if (streq(argv[i], "--log-io"))
32 logging_io = true;
33 if (streq(argv[i], "--log-trace"))
34 logging_trace = true;
35 }
36
37 developer = daemon_developer_mode(argv);
38 daemon_setup(argv[0], status_backtrace_print, status_backtrace_exit);
39 return developer;
40}

Callers 5

mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50
mainFunction · 0.50

Calls 3

versionFunction · 0.85
daemon_developer_modeFunction · 0.85
daemon_setupFunction · 0.85

Tested by

no test coverage detected