mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #7951 from yifan-gu/rkt_pty
kubelet/container: Move pty*.go to container runtime package.
This commit is contained in:
		@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
 | 
			
		||||
limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package dockertools
 | 
			
		||||
package container
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"os"
 | 
			
		||||
@@ -16,7 +16,7 @@ See the License for the specific language governing permissions and
 | 
			
		||||
limitations under the License.
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
package dockertools
 | 
			
		||||
package container
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"os"
 | 
			
		||||
@@ -929,7 +929,7 @@ func (dm *DockerManager) ExecInContainer(containerId string, cmd []string, stdin
 | 
			
		||||
	args = append(args, cmd...)
 | 
			
		||||
	command := exec.Command(nsenter, args...)
 | 
			
		||||
	if tty {
 | 
			
		||||
		p, err := StartPty(command)
 | 
			
		||||
		p, err := kubecontainer.StartPty(command)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,6 @@ import (
 | 
			
		||||
	"github.com/docker/docker/pkg/parsers"
 | 
			
		||||
	docker "github.com/fsouza/go-dockerclient"
 | 
			
		||||
	"github.com/golang/glog"
 | 
			
		||||
	"github.com/kr/pty"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
const (
 | 
			
		||||
@@ -928,8 +927,7 @@ func (r *runtime) ExecInContainer(containerID string, cmd []string, stdin io.Rea
 | 
			
		||||
	command := r.buildCommand(args...)
 | 
			
		||||
 | 
			
		||||
	if tty {
 | 
			
		||||
		// TODO(yifan): Merge with dockertools.StartPty().
 | 
			
		||||
		p, err := pty.Start(command)
 | 
			
		||||
		p, err := kubecontainer.StartPty(command)
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user