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
615f24ff
Unverified
Commit
615f24ff
authored
Jul 04, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: use fd_cloexec()
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
b7b18fc5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
conf.c
src/lxc/conf.c
+2
-2
No files found.
src/lxc/conf.c
View file @
615f24ff
...
@@ -984,12 +984,12 @@ int lxc_allocate_ttys(struct lxc_conf *conf)
...
@@ -984,12 +984,12 @@ int lxc_allocate_ttys(struct lxc_conf *conf)
tty
->
name
,
tty
->
master
,
tty
->
slave
);
tty
->
name
,
tty
->
master
,
tty
->
slave
);
/* Prevent leaking the file descriptors to the container */
/* Prevent leaking the file descriptors to the container */
ret
=
f
cntl
(
tty
->
master
,
F_SETFD
,
FD_CLOEXEC
);
ret
=
f
d_cloexec
(
tty
->
master
,
true
);
if
(
ret
<
0
)
if
(
ret
<
0
)
SYSWARN
(
"Failed to set FD_CLOEXEC flag on master fd %d of "
SYSWARN
(
"Failed to set FD_CLOEXEC flag on master fd %d of "
"tty device
\"
%s
\"
"
,
tty
->
master
,
tty
->
name
);
"tty device
\"
%s
\"
"
,
tty
->
master
,
tty
->
name
);
ret
=
f
cntl
(
tty
->
slave
,
F_SETFD
,
FD_CLOEXEC
);
ret
=
f
d_cloexec
(
tty
->
slave
,
true
);
if
(
ret
<
0
)
if
(
ret
<
0
)
SYSWARN
(
"Failed to set FD_CLOEXEC flag on slave fd %d of "
SYSWARN
(
"Failed to set FD_CLOEXEC flag on slave fd %d of "
"tty device
\"
%s
\"
"
,
tty
->
slave
,
tty
->
name
);
"tty device
\"
%s
\"
"
,
tty
->
slave
,
tty
->
name
);
...
...
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