@@ -103,9 +103,10 @@ func (ctr *container) start() error {
103
103
104
104
// Tell the docker engine that the container has started.
105
105
si := StateInfo {
106
- State : StateStart ,
107
- Pid : ctr .systemPid , // Not sure this is needed? Double-check monitor.go in daemon BUGBUG @jhowardmsft
108
- }
106
+ CommonStateInfo : CommonStateInfo {
107
+ State : StateStart ,
108
+ Pid : ctr .systemPid , // Not sure this is needed? Double-check monitor.go in daemon BUGBUG @jhowardmsft
109
+ }}
109
110
return ctr .client .backend .StateChanged (ctr .containerID , si )
110
111
111
112
}
@@ -129,10 +130,13 @@ func (ctr *container) waitExit(pid uint32, processFriendlyName string, isFirstPr
129
130
130
131
// Assume the container has exited
131
132
si := StateInfo {
132
- State : StateExit ,
133
- ExitCode : uint32 (exitCode ),
134
- Pid : pid ,
135
- ProcessID : processFriendlyName ,
133
+ CommonStateInfo : CommonStateInfo {
134
+ State : StateExit ,
135
+ ExitCode : uint32 (exitCode ),
136
+ Pid : pid ,
137
+ ProcessID : processFriendlyName ,
138
+ },
139
+ UpdatePending : false ,
136
140
}
137
141
138
142
// But it could have been an exec'd process which exited
@@ -143,6 +147,11 @@ func (ctr *container) waitExit(pid uint32, processFriendlyName string, isFirstPr
143
147
// If this is the init process, always call into vmcompute.dll to
144
148
// shutdown the container after we have completed.
145
149
if isFirstProcessToStart {
150
+
151
+ // TODO Windows - add call into hcsshim to check if an update
152
+ // is pending once that is available.
153
+ //si.UpdatePending = CHECK IF UPDATE NEEDED
154
+
146
155
logrus .Debugf ("Shutting down container %s" , ctr .containerID )
147
156
// Explicit timeout here rather than hcsshim.TimeoutInfinte to avoid a
148
157
// (remote) possibility that ShutdownComputeSystem hangs indefinitely.
0 commit comments