File tree 1 file changed +13
-10
lines changed
1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ func (o *TraceRunnerOptions) Run() error {
90
90
}
91
91
}
92
92
93
- fmt .Println ("if you have maps to print, send a SIGINT using Ctrl-C, if you want to interrupt the execution send SIGINT two times" )
93
+ fmt .Println ("if your program has maps to print, send a SIGINT using Ctrl-C, if you want to interrupt the execution send SIGINT two times" )
94
94
ctx , cancel := context .WithCancel (context .Background ())
95
95
sigCh := make (chan os.Signal , 1 )
96
96
@@ -99,16 +99,19 @@ func (o *TraceRunnerOptions) Run() error {
99
99
go func () {
100
100
killable := false
101
101
defer cancel ()
102
- M:
103
- select {
104
- case <- ctx .Done ():
105
- return
106
- case <- sigCh :
107
- if ! killable {
108
- killable = true
109
- goto M
102
+
103
+ for {
104
+ select {
105
+ case <- ctx .Done ():
106
+ return
107
+ case <- sigCh :
108
+ if ! killable {
109
+ killable = true
110
+ fmt .Println ("\n first SIGINT received, now if your program had maps and did not free them it should print them out" )
111
+ continue
112
+ }
113
+ return
110
114
}
111
- return
112
115
}
113
116
}()
114
117
You can’t perform that action at this time.
0 commit comments