Browse Source

Catch error on console creation

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Alexandr Morozov 11 years ago
parent
commit
93f6cf0351
1 changed files with 3 additions and 0 deletions
  1. 3 0
      daemon/execdriver/native/driver.go

+ 3 - 0
daemon/execdriver/native/driver.go

@@ -106,6 +106,9 @@ func (d *driver) Run(c *execdriver.Command, pipes *execdriver.Pipes, startCallba
 	} else {
 		term, err = execdriver.NewStdConsole(c, pipes)
 	}
+	if err != nil {
+		return -1, err
+	}
 	c.Terminal = term
 
 	d.Lock()