Browse Source

Fix a scope issue preventing the close of slave stdin pty (#228)

Guillaume J. Charmes 12 năm trước cách đây
mục cha
commit
7efde5eb83
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      container.go

+ 2 - 1
container.go

@@ -183,7 +183,8 @@ func (container *Container) startPty() error {
 	// stdin
 	var stdinSlave io.ReadCloser
 	if container.Config.OpenStdin {
-		stdinMaster, stdinSlave, err := pty.Open()
+		var stdinMaster io.WriteCloser
+		stdinMaster, stdinSlave, err = pty.Open()
 		if err != nil {
 			return err
 		}