mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-04 14:55:36 +00:00
Merge pull request #1528 from brauner/2017-04-28/close_fd_in_lxc_setup_devpts
conf: close fd in lxc_setup_devpts()
This commit is contained in:
commit
1545a1f163
@ -1428,10 +1428,11 @@ static int lxc_setup_devpts(int num_pts)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user