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:
parent
a304eab9d4
commit
d62cc1cc66
2 changed files with 3 additions and 2 deletions
|
@ -50,7 +50,8 @@ func ExecContainer(container *libcontainer.Container) (pid int, err error) {
|
||||||
// command.Stderr = os.Stderr
|
// command.Stderr = os.Stderr
|
||||||
command.SysProcAttr = &syscall.SysProcAttr{}
|
command.SysProcAttr = &syscall.SysProcAttr{}
|
||||||
command.SysProcAttr.Cloneflags = flag
|
command.SysProcAttr.Cloneflags = flag
|
||||||
//command.ExtraFiles = []*os.File{master}
|
|
||||||
|
command.ExtraFiles = []*os.File{master}
|
||||||
|
|
||||||
println("vvvvvvvvv")
|
println("vvvvvvvvv")
|
||||||
if err := command.Start(); err != nil {
|
if err := command.Start(); err != nil {
|
||||||
|
|
|
@ -41,7 +41,7 @@ func SetupNewMountNamespace(rootfs, console string, readonly bool) error {
|
||||||
if err := os.Remove(ptmx); err != nil && !os.IsNotExist(err) {
|
if err := os.Remove(ptmx); err != nil && !os.IsNotExist(err) {
|
||||||
return 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)
|
return fmt.Errorf("symlink dev ptmx %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue