tty: ClosePostStart: rm return value

It is not and was not ever used.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2021-11-29 19:40:57 -08:00
parent f3f4b6d155
commit 3648346572
2 changed files with 2 additions and 6 deletions
+1 -2
View File
@@ -159,11 +159,10 @@ func (t *tty) waitConsole() error {
// ClosePostStart closes any fds that are provided to the container and dup2'd // ClosePostStart closes any fds that are provided to the container and dup2'd
// so that we no longer have copy in our process. // so that we no longer have copy in our process.
func (t *tty) ClosePostStart() error { func (t *tty) ClosePostStart() {
for _, c := range t.postStart { for _, c := range t.postStart {
_ = c.Close() _ = c.Close()
} }
return nil
} }
// Close closes all open fds for the tty and/or restores the original // Close closes all open fds for the tty and/or restores the original
+1 -4
View File
@@ -301,10 +301,7 @@ func (r *runner) run(config *specs.Process) (int, error) {
r.terminate(process) r.terminate(process)
return -1, err return -1, err
} }
if err = tty.ClosePostStart(); err != nil { tty.ClosePostStart()
r.terminate(process)
return -1, err
}
if r.pidFile != "" { if r.pidFile != "" {
if err = createPidFile(r.pidFile, process); err != nil { if err = createPidFile(r.pidFile, process); err != nil {
r.terminate(process) r.terminate(process)