]> git.proxmox.com Git - mirror_lxc.git/blobdiff - src/lxc/start.c
confile:add lxc.init.cwd
[mirror_lxc.git] / src / lxc / start.c
index 1c47fd95ecb508987301880d58f190b1b786e880..a6bb8032570e02486fb2c064da9a1dcb2a20881e 100644 (file)
@@ -979,6 +979,11 @@ static int do_start(void *data)
 
        setsid();
 
+       if (handler->conf->init_cwd && chdir(handler->conf->init_cwd)) {
+               SYSERROR("Could not change directory to \"%s\"", handler->conf->init_cwd);
+               goto out_warn_father;
+       }
+
        if (lxc_sync_barrier_parent(handler, LXC_SYNC_CGROUP_LIMITS))
                goto out_warn_father;