diff --git a/daemon/execdriver/lxc/driver.go b/daemon/execdriver/lxc/driver.go index 1df1d68f6d..e1b4763582 100644 --- a/daemon/execdriver/lxc/driver.go +++ b/daemon/execdriver/lxc/driver.go @@ -9,6 +9,7 @@ import ( "os/exec" "path" "path/filepath" + "runtime" "strconv" "strings" "syscall" @@ -26,6 +27,7 @@ const DriverName = "lxc" func init() { execdriver.RegisterInitFunc(DriverName, func(args *execdriver.InitArgs) error { + runtime.LockOSThread() if err := setupEnv(args); err != nil { return err }