We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4853c30 commit 47dd7c7Copy full SHA for 47dd7c7
main.go
@@ -19,9 +19,11 @@ import (
19
"github.com/mmmorris1975/simple-logger"
20
"os"
21
"os/exec"
22
+ "os/signal"
23
"path/filepath"
24
"runtime"
25
"strings"
26
+ "syscall"
27
"time"
28
)
29
@@ -50,6 +52,8 @@ var (
50
52
ses *session.Session
51
53
cfg *config.AwsConfig
54
usr *credlib.AwsIdentity
55
+
56
+ sigCh = make(chan os.Signal, 3)
57
58
59
func init() {
@@ -103,6 +107,14 @@ func init() {
103
107
}
104
108
105
109
func main() {
110
+ signal.Notify(sigCh, os.Interrupt, syscall.SIGQUIT)
111
+ go func() {
112
+ for {
113
+ sig := <-sigCh
114
+ log.Debugf("Got signal: %s", sig.String())
115
+ }
116
+ }()
117
106
118
kingpin.CommandLine.Interspersed(false)
119
kingpin.Parse()
120
0 commit comments