void process_rootfs_chroot(ProcessHandle process) {
	if (fchdir(process_get_fd(process)) < 0)
		errExit("fchdir");

	int called_as_root = 0;
	if (geteuid() == 0)
		called_as_root = 1;
	if (called_as_root == 0)
		EUID_ROOT();

	if (chroot("root") < 0)
		errExit("chroot");

	if (called_as_root == 0)
		EUID_USER();

	if (chdir("/") < 0)
		errExit("chdir");
}
void process_rootfs_chroot(ProcessHandle process) {
	if (fchdir(process_get_fd(process)) < 0)
		errExit("fchdir");

	int called_as_root = 0;
	if (geteuid() == 0)
		called_as_root = 1;
	if (called_as_root == 0)
		EUID_ROOT();

	if (chroot("root") < 0)
		errExit("chroot");

	if (called_as_root == 0)
		EUID_USER();

	if (chdir("/") < 0)
		errExit("chdir");
}