MCPcopy
hub / github.com/opencontainers/runc / Close

Method Close

tty.go:170–187  ·  view source on GitHub ↗

Close closes all open fds for the tty and/or restores the original stdin state to what it was prior to the container execution

()

Source from the content-addressed store, hash-verified

168// Close closes all open fds for the tty and/or restores the original
169// stdin state to what it was prior to the container execution
170func (t *tty) Close() {
171 // ensure that our side of the fds are always closed
172 for _, c := range t.postStart {
173 _ = c.Close()
174 }
175 // the process is gone at this point, shutting down the console if we have
176 // one and wait for all IO to be finished
177 if t.console != nil && t.epoller != nil {
178 _ = t.console.Shutdown(t.epoller.CloseConsole)
179 }
180 t.wg.Wait()
181 for _, c := range t.closers {
182 _ = c.Close()
183 }
184 if t.hostConsole != nil {
185 _ = t.hostConsole.Reset()
186 }
187}
188
189func (t *tty) resize() error {
190 if t.console == nil || t.hostConsole == nil {

Callers 15

loadSpecFunction · 0.45
TestNotifyHostFunction · 0.45
expectBarrierFunction · 0.45
setupIOFunction · 0.45
createPidFileFunction · 0.45
runMethod · 0.45
setupPidfdSocketFunction · 0.45
update.goFile · 0.45
copyIOMethod · 0.45
setupProcessPipesFunction · 0.45
recvttyMethod · 0.45
ClosePostStartMethod · 0.45

Calls 2

ShutdownMethod · 0.80
WaitMethod · 0.80

Tested by 2

TestNotifyHostFunction · 0.36
expectBarrierFunction · 0.36