Protect shutdown callbacks lists with a mutex (#2432)

This commit is contained in:
Anis Elleuch
2016-08-15 07:55:48 +01:00
committed by Harshavardhana
parent 9606cb9bcd
commit 5526ac13d2
9 changed files with 150 additions and 97 deletions

View File

@@ -158,9 +158,6 @@ func main() {
// Enable all loggers by now.
enableLoggers()
// Initialize name space lock.
initNSLock()
// Set global quiet flag.
globalQuiet = c.Bool("quiet") || c.GlobalBool("quiet")
@@ -189,10 +186,6 @@ func main() {
defer profile.Start(profile.BlockProfile, profile.ProfilePath(profileDir)).Stop()
}
// Initialize and monitor shutdown signal
shutdownSignal = make(chan bool, 1)
monitorShutdownSignal(os.Exit)
// Run the app - exit on error.
app.RunAndExitOnError()
}