cli: Backtrace on SIGUSR1

Rework the signal handling code so that if debug is enabled and a
`SIGUSR1` signal is received, backtrace to the system log but continue
to run.

Added some basic tests for the signal handling code.

Fixes #241.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt
2018-04-23 15:23:30 +01:00
parent fc8d913713
commit 6191ddffb3
4 changed files with 166 additions and 9 deletions

View File

@@ -470,6 +470,7 @@ func loadConfiguration(configPath string, ignoreLogging bool) (resolvedConfigPat
}
if tomlConf.Runtime.Debug {
debug = true
crashOnError = true
} else {
// If debug is not required, switch back to the original