Jigger with shutdown method to avoid a crash on CTRL+C in Windows. Feels a big hacky, might revisit later.

This commit is contained in:
Adam Ierymenko 2013-08-27 18:00:07 -04:00
parent 0afcf4877c
commit 01a70d09db
4 changed files with 27 additions and 31 deletions

View file

@ -61,6 +61,7 @@ class RuntimeEnvironment
{
public:
RuntimeEnvironment() :
shutdownInProgress(false),
log((Logger *)0),
prng((CMWC4096 *)0),
demarc((Demarc *)0),
@ -82,14 +83,16 @@ public:
Identity identity;
volatile bool shutdownInProgress;
// Order matters a bit here. These are constructed in this order
// and then deleted in the opposite order on Node exit.
Logger *log; // may be null
CMWC4096 *prng;
Demarc *demarc;
Multicaster *multicaster;
Switch *sw;
Demarc *demarc;
Topology *topology;
SysEnv *sysEnv;
NodeConfig *nc;