]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
Do not chdir when daemonize
authorDaniel Lezcano <daniel.lezcano@free.fr>
Fri, 20 Nov 2009 14:01:30 +0000 (15:01 +0100)
committerDaniel Lezcano <dlezcano@fr.ibm.com>
Fri, 20 Nov 2009 14:01:30 +0000 (15:01 +0100)
With the previous modifications, a temporary directory is created
to mount the rootfs in order to have the system container to remount
itself the '/' directory.

But in case of daemonize, we change the directory, so when the rootfs
is specified with a relative path, we can not access it.

Don't chdir, as that will be done automatically later in the chroot
setup.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/lxc_start.c

index 9e14b8fc76dced41ff86aba268ce8426104ebcde..c2c5fa41a323f419d4ffbf713e9bb03c9c8beecc 100644 (file)
@@ -183,8 +183,6 @@ int main(int argc, char *argv[])
                        open(my_args.log_file, O_RDONLY | O_CLOEXEC);
                        open(my_args.log_file, O_RDONLY | O_CLOEXEC);
                }
-
-               chdir("/");
        }
 
        save_tty(&tios);