I think we were talking about the root, not the cwd. However, the same
issues apply. I think the cleanest is to not do anything, although it
may have some serious problems.
For the normal case where you'd have no processes except a pseudo-init
running, you'd just do chdir("/"); chroot("/"); before you
execl("/sbin/init", "init", 0); but I don't know if there are other
applications in which it would be an issue.
-- <hpa@transmeta.com> at work, <hpa@zytor.com> in private! "Unix gives you enough rope to shoot yourself in the foot."- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/