Skip to content

Commit

Permalink
Do not close pty in closeIO()
Browse files Browse the repository at this point in the history
  • Loading branch information
adambabik committed Feb 2, 2024
1 parent 97b0813 commit 5782210
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions internal/command/command_virtual.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,20 +257,20 @@ func (c *VirtualCommand) setErr(err error) {
}

func (c *VirtualCommand) closeIO() error {
if err := c.tty.Close(); err != nil {
return errors.WithMessage(err, "failed to close tty")
}

if err := c.pty.Close(); err != nil {
return errors.WithMessage(err, "failed to close pty")
}

if !isNil(c.stdin) {
if err := c.stdin.Close(); err != nil {
return errors.WithMessage(err, "failed to close stdin")
}
}

if err := c.tty.Close(); err != nil {
return errors.WithMessage(err, "failed to close tty")
}

// if err := c.pty.Close(); err != nil {
// return errors.WithMessage(err, "failed to close pty")
// }

return nil
}

Expand Down

0 comments on commit 5782210

Please sign in to comment.