expose multi process/single process option

This commit is contained in:
Jeff Becker 2018-06-06 08:49:46 -04:00
parent 0278ba559c
commit e12bd9442f
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05
3 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ main(int argc, char *argv[])
const char *conffname = "daemon.ini";
if(argc > 1)
conffname = argv[1];
ctx = llarp_main_init(conffname);
ctx = llarp_main_init(conffname, true);
int code = 1;
if(ctx)
{

View File

@ -17,7 +17,7 @@ struct llarp_main;
/** initialize application context and load config */
struct llarp_main *
llarp_main_init(const char *fname);
llarp_main_init(const char *fname, bool multiProcess);
/** handle signal for main context */
void

View File

@ -246,13 +246,13 @@ struct llarp_main
};
struct llarp_main *
llarp_main_init(const char *fname)
llarp_main_init(const char *fname, bool multiProcess)
{
if(!fname)
fname = "daemon.ini";
llarp_main *m = new llarp_main;
m->ctx.reset(new llarp::Context(std::cout));
m->ctx.reset(new llarp::Context(std::cout, !multiProcess));
if(!m->ctx->LoadConfig(fname))
{
m->ctx->Close();