File tree 2 files changed +13
-14
lines changed
2 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ func start(log *os.File) error {
108
108
return nil
109
109
}
110
110
var exitShim bool
111
- for {
111
+ for ! exitShim {
112
112
select {
113
113
case s := <- signals :
114
114
switch s {
@@ -122,18 +122,6 @@ func start(log *os.File) error {
122
122
}
123
123
}
124
124
}
125
- // runtime has exited so the shim can also exit
126
- if exitShim {
127
- // kill all processes in the container incase it was not running in
128
- // its own PID namespace
129
- p .killAll ()
130
- // wait for all the processes and IO to finish
131
- p .Wait ()
132
- // delete the container from the runtime
133
- p .delete ()
134
- // the close of the exit fifo will happen when the shim exits
135
- return nil
136
- }
137
125
case msg := <- msgC :
138
126
switch msg .Type {
139
127
case 0 :
@@ -153,6 +141,17 @@ func start(log *os.File) error {
153
141
}
154
142
}
155
143
}
144
+
145
+ // runtime has exited so the shim can also exit
146
+
147
+ // kill all processes in the container incase it was not running in
148
+ // its own PID namespace
149
+ p .killAll ()
150
+ // wait for all the processes and IO to finish
151
+ p .Wait ()
152
+ // delete the container from the runtime
153
+ p .delete ()
154
+ // the close of the exit fifo will happen when the shim exits
156
155
return nil
157
156
}
158
157
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ type checkpoint struct {
36
36
}
37
37
38
38
type processState struct {
39
- Terminal bool `json:terminal`
39
+ Terminal bool `json:" terminal" `
40
40
Exec bool `json:"exec"`
41
41
Stdin string `json:"containerdStdin"`
42
42
Stdout string `json:"containerdStdout"`
You can’t perform that action at this time.
0 commit comments