add interrupt handling for SIGTERM [GH-1858]
This commit is contained in:
parent
d18300e3d6
commit
50fef50e4b
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue