Fix ptmx issue on libcontainer

Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
This commit is contained in:
Guillaume J. Charmes 2014-02-19 12:47:01 -08:00 committed by Michael Crosby
parent 7038f59689
commit 542982f993
2 changed files with 3 additions and 2 deletions

View File

@ -50,7 +50,8 @@ func ExecContainer(container *libcontainer.Container) (pid int, err error) {
// command.Stderr = os.Stderr
command.SysProcAttr = &syscall.SysProcAttr{}
command.SysProcAttr.Cloneflags = flag
//command.ExtraFiles = []*os.File{master}
command.ExtraFiles = []*os.File{master}
println("vvvvvvvvv")
if err := command.Start(); err != nil {

View File

@ -41,7 +41,7 @@ func SetupNewMountNamespace(rootfs, console string, readonly bool) error {
if err := os.Remove(ptmx); err != nil && !os.IsNotExist(err) {
return err
}
if err := os.Symlink(filepath.Join(rootfs, "pts/ptmx"), ptmx); err != nil {
if err := os.Symlink("pts/ptmx", ptmx); err != nil {
return fmt.Errorf("symlink dev ptmx %s", err)
}