Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
1545a1f1
Commit
1545a1f1
authored
Apr 28, 2017
by
Serge Hallyn
Committed by
GitHub
Apr 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1528 from brauner/2017-04-28/close_fd_in_lxc_setup_devpts
conf: close fd in lxc_setup_devpts()
parents
da1ef68c
e87bd19c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
conf.c
src/lxc/conf.c
+2
-1
No files found.
src/lxc/conf.c
View file @
1545a1f1
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment