Commit Graph

2 Commits

Author SHA1 Message Date
Josh Rickmar
6c1aa07a4f Add pipes for parent process IPC. (#311)
Rewrite startup/shutdown logic to simplify shutdown signaling.  All
cleanup is now run from deferred functions in the main function.

Add two new config options to set the read and write ends of a pair of
pipes.  This is used as a simple mechanism for a parent process to
communicate with, observe, and manage the lifetime of a child dcrd
process.  When the RX (read end) pipe is closed, clean shutdown
automatically begins.

Add a new flag --lifetimeevents to create and send lifetime event
notifications over the TX (write end) pipe during bringup and
shutdown.  This allows the parent process to observe which subsystems
are currently starting, running, and stopping.

Fixes #297.
Fixes #298.
2016-08-31 10:45:16 -04:00
David Hill
7701a7ab63 dcrd: handle signal SIGTERM (#688) (#156)
When an OS reboots or shuts down, it sends all processes SIGTERM before
sending SIGKILL.  This allows dcrd to do a proper shutdown which most
importantly closes the databases.
2016-05-06 08:11:35 -05:00