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
0f73b621
Commit
0f73b621
authored
Sep 22, 2016
by
Christian Brauner
Committed by
GitHub
Sep 22, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1204 from tych0/close-tty-on-restore
c/r: detatch from controlling tty on restore
parents
2b8640df
a7fb6043
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
criu.c
src/lxc/criu.c
+14
-1
No files found.
src/lxc/criu.c
View file @
0f73b621
...
@@ -662,9 +662,22 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
...
@@ -662,9 +662,22 @@ static void do_restore(struct lxc_container *c, int status_pipe, struct migrate_
{
{
pid_t
pid
;
pid_t
pid
;
struct
lxc_handler
*
handler
;
struct
lxc_handler
*
handler
;
int
status
;
int
status
,
fd
;
int
pipes
[
2
]
=
{
-
1
,
-
1
};
int
pipes
[
2
]
=
{
-
1
,
-
1
};
/* Try to detach from the current controlling tty if it exists.
* Othwerise, lxc_init (via lxc_console) will attach the container's
* console output to the current tty, which is probably not what any
* library user wants, and if they do, they can just manually configure
* it :)
*/
fd
=
open
(
"/dev/tty"
,
O_RDWR
);
if
(
fd
>=
0
)
{
if
(
ioctl
(
fd
,
TIOCNOTTY
,
NULL
)
<
0
)
SYSERROR
(
"couldn't detach from tty"
);
close
(
fd
);
}
handler
=
lxc_init
(
c
->
name
,
c
->
lxc_conf
,
c
->
config_path
);
handler
=
lxc_init
(
c
->
name
,
c
->
lxc_conf
,
c
->
config_path
);
if
(
!
handler
)
if
(
!
handler
)
goto
out
;
goto
out
;
...
...
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