|
|
|
@ -13,6 +13,7 @@ import (
|
|
|
|
"path/filepath"
|
|
|
|
"path/filepath"
|
|
|
|
"runtime"
|
|
|
|
"runtime"
|
|
|
|
"sync"
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"syscall"
|
|
|
|
"time"
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
|
|
"github.com/hashicorp/go-uuid"
|
|
|
|
"github.com/hashicorp/go-uuid"
|
|
|
|
@ -86,6 +87,7 @@ func realMain() int {
|
|
|
|
wrapConfig.Writer = io.MultiWriter(logTempFile, logWriter)
|
|
|
|
wrapConfig.Writer = io.MultiWriter(logTempFile, logWriter)
|
|
|
|
wrapConfig.Stdout = outW
|
|
|
|
wrapConfig.Stdout = outW
|
|
|
|
wrapConfig.DetectDuration = 500 * time.Millisecond
|
|
|
|
wrapConfig.DetectDuration = 500 * time.Millisecond
|
|
|
|
|
|
|
|
wrapConfig.ForwardSignals = []os.Signal{syscall.SIGTERM}
|
|
|
|
exitStatus, err := panicwrap.Wrap(&wrapConfig)
|
|
|
|
exitStatus, err := panicwrap.Wrap(&wrapConfig)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
fmt.Fprintf(os.Stderr, "Couldn't start Packer: %s", err)
|
|
|
|
fmt.Fprintf(os.Stderr, "Couldn't start Packer: %s", err)
|
|
|
|
|