This left the file descriptor to the underlying /dev/ptmx file open which
confused the hell out of criu. Let's close it.
Closes https://github.com/lxc/lxd/issues/3243.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
SYSERROR("failed to create dummy \"/dev/ptmx\" file as bind mount target");
return -1;
}
+ close(ret);
DEBUG("created dummy \"/dev/ptmx\" file as bind mount target");
/* Fallback option: create symlink /dev/ptmx -> /dev/pts/ptmx */
- ret = mount("/dev/pts/ptmx", "/dev/ptmx", "none", MS_BIND, 0);
+ ret = mount("/dev/pts/ptmx", "/dev/ptmx", NULL, MS_BIND, NULL);
if (!ret) {
DEBUG("bind mounted \"/dev/pts/ptmx\" to \"/dev/ptmx\"");
return 0;