Hello,
Could anybody please explain:
In  create_run_template() ,
https://github.com/lxc/lxc/blob/master/src/lxc/lxccontainer.c

we have:

 if (quiet) {
                        close(0);
                        close(1);
                        close(2);
                        open("/dev/zero", O_RDONLY);
                        open("/dev/null", O_RDWR);
                        open("/dev/null", O_RDWR);
                }

Why do we need twice to call  open("/dev/null", O_RDWR) ? Is it have
to do with running as daemon ? or is it redundant ?
We don't use the returned fd in both cases.

Kevin
_______________________________________________
lxc-devel mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-devel

Reply via email to