Handle non-tty mode
Docker-DCO-1.1-Signed-off-by: Guillaume J. Charmes <guillaume.charmes@docker.com> (github: creack)
This commit is contained in:
parent
41696722fa
commit
97738ffed3
4 changed files with 70 additions and 30 deletions
|
@ -40,8 +40,10 @@ func setupNewMountNamespace(rootfs, console string, readonly bool) error {
|
|||
if err := setupDev(rootfs); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := setupPtmx(rootfs, console); err != nil {
|
||||
return err
|
||||
if console != "" {
|
||||
if err := setupPtmx(rootfs, console); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if err := system.Chdir(rootfs); err != nil {
|
||||
return fmt.Errorf("chdir into %s %s", rootfs, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue