Skip to content

Commit

Permalink
Update panicwrap to pass through all interrupt signals
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Dec 8, 2016
1 parent 9ab7cab commit 557375f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func realMain() int {
wrapConfig.Handler = panicHandler(logTempFile)
wrapConfig.Writer = io.MultiWriter(logTempFile, logWriter)
wrapConfig.Stdout = outW
wrapConfig.IgnoreSignals = interruptSignals
exitStatus, err := panicwrap.Wrap(&wrapConfig)
if err != nil {
fmt.Fprintf(os.Stderr, "Couldn't start Terraform: %s", err)
Expand Down
5 changes: 4 additions & 1 deletion signal_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ import (
"syscall"
)

var interruptSignals []os.Signal = []os.Signal{os.Interrupt, syscall.SIGTERM}
var interruptSignals []os.Signal = []os.Signal{
os.Interrupt,
syscall.SIGTERM,
}

0 comments on commit 557375f

Please sign in to comment.