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
535ceb0b
Unverified
Commit
535ceb0b
authored
Jul 09, 2018
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
start: don't unconditionally open("/dev/null")
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
3a8d6b64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
14 deletions
+9
-14
start.c
src/lxc/start.c
+9
-14
No files found.
src/lxc/start.c
View file @
535ceb0b
...
@@ -1287,23 +1287,18 @@ static int do_start(void *data)
...
@@ -1287,23 +1287,18 @@ static int do_start(void *data)
close
(
handler
->
sigfd
);
close
(
handler
->
sigfd
);
if
(
devnull_fd
<
0
)
{
if
(
handler
->
conf
->
console
.
slave
<
0
&&
handler
->
backgrounded
)
{
devnull_fd
=
open_devnull
();
if
(
devnull_fd
<
0
)
{
devnull_fd
=
open_devnull
();
if
(
devnull_fd
<
0
)
if
(
devnull_fd
<
0
)
goto
out_warn_father
;
goto
out_warn_father
;
}
}
if
(
handler
->
conf
->
console
.
slave
<
0
&&
handler
->
backgrounded
)
ret
=
set_stdfds
(
devnull_fd
);
if
(
set_stdfds
(
devnull_fd
)
<
0
)
{
if
(
ret
<
0
)
{
ERROR
(
"Failed to redirect std{in,out,err} to "
ERROR
(
"Failed to redirect std{in,out,err} to
\"
/dev/null
\"
"
);
"
\"
/dev/null
\"
"
);
goto
out_warn_father
;
goto
out_warn_father
;
}
}
if
(
devnull_fd
>=
0
)
{
close
(
devnull_fd
);
devnull_fd
=
-
1
;
}
}
setsid
();
setsid
();
...
...
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