add interrupt handling for SIGTERM [GH-1858]

This commit is contained in:
Mitchell Hashimoto 2015-06-08 21:28:36 -07:00
parent d18300e3d6
commit 50fef50e4b
2 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,7 @@ FEATURES:
IMPROVEMENTS:
* core: Interrupt handling for SIGTERM signal as well. [GH-1858]
* builder/openstack: Add `rackconnect_wait` for Rackspace customers to wait for
RackConnect data to appear
* buidler/openstakc: Add `ssh_interface` option for rackconnect for users that

View File

@ -4,6 +4,7 @@ import (
"log"
"os"
"os/signal"
"syscall"
"github.com/mitchellh/packer/packer"
"github.com/mitchellh/packer/packer/plugin"
@ -14,6 +15,7 @@ import (
func setupSignalHandlers(ui packer.Ui) {
ch := make(chan os.Signal, 1)
signal.Notify(ch, os.Interrupt)
signal.Notify(ch, syscall.SIGTERM)
go func() {
// First interrupt. We mostly ignore this because it allows the