diff --git a/CHANGELOG.md b/CHANGELOG.md index 19ebd670a9a..dc41ef46399 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ - [#6462](https://github.com/influxdata/influxdb/pull/6462): Add safer locking to CreateFieldIfNotExists - [#6361](https://github.com/influxdata/influxdb/pull/6361): Fix cluster/pool release of connection - [#6470](https://github.com/influxdata/influxdb/pull/6470): Remove SHOW SERVERS & DROP SERVER support +- [#6477] (https://github.com/influxdata/influxdb/pull/6477): Don't catch SIGQUIT or SIGHUP signals. ## v0.12.2 [2016-04-20] diff --git a/cmd/influx/cli/cli.go b/cmd/influx/cli/cli.go index b9e544a6fb5..60ad87e2161 100644 --- a/cmd/influx/cli/cli.go +++ b/cmd/influx/cli/cli.go @@ -74,9 +74,9 @@ func New(version string) *CommandLine { // Run executes the CLI func (c *CommandLine) Run() error { - // register OS signals for graceful termination if !c.IgnoreSignals { - signal.Notify(c.osSignals, os.Kill, os.Interrupt, syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGHUP) + // register OS signals for graceful termination + signal.Notify(c.osSignals, syscall.SIGINT, syscall.SIGTERM) } var promptForPassword bool @@ -182,7 +182,8 @@ func (c *CommandLine) Run() error { for { select { case <-c.osSignals: - close(c.Quit) + c.exit() + return nil case <-c.Quit: c.exit() return nil @@ -210,7 +211,6 @@ func (c *CommandLine) ParseCommand(cmd string) error { if len(tokens) > 0 { switch tokens[0] { case "exit", "quit": - // signal the program to exit close(c.Quit) case "gopher": c.gopher()