oci: propagate XDG_RUNTIME_DIR to conmon
@@ -209,6 +209,7 @@ func (r *Runtime) CreateContainer(c *Container, cgroupParent string) (err error)
// 0, 1 and 2 are stdin, stdout and stderr
cmd.Env = append(r.conmonEnv, fmt.Sprintf("_OCI_SYNCPIPE=%d", 3))
cmd.Env = append(cmd.Env, fmt.Sprintf("_OCI_STARTPIPE=%d", 4))
+ cmd.Env = append(cmd.Env, fmt.Sprintf("XDG_RUNTIME_DIR=%s", os.Getenv("XDG_RUNTIME_DIR")))
err = cmd.Start()
if err != nil {
