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
5c478fb5
Unverified
Commit
5c478fb5
authored
May 28, 2018
by
Stéphane Graber
Committed by
GitHub
May 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2358 from brauner/2018-05-28/do_not_init_ns_clone_flags
start: do not init ns_clone_flags to -1
parents
b7184135
386e6768
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
conf.c
src/lxc/conf.c
+14
-2
start.c
src/lxc/start.c
+0
-2
No files found.
src/lxc/conf.c
View file @
5c478fb5
...
@@ -968,6 +968,8 @@ int lxc_allocate_ttys(const char *name, struct lxc_conf *conf)
...
@@ -968,6 +968,8 @@ int lxc_allocate_ttys(const char *name, struct lxc_conf *conf)
for
(
i
=
0
;
i
<
ttys
->
max
;
i
++
)
{
for
(
i
=
0
;
i
<
ttys
->
max
;
i
++
)
{
struct
lxc_terminal_info
*
tty
=
&
ttys
->
tty
[
i
];
struct
lxc_terminal_info
*
tty
=
&
ttys
->
tty
[
i
];
tty
->
master
=
-
EBADF
;
tty
->
slave
=
-
EBADF
;
ret
=
openpty
(
&
tty
->
master
,
&
tty
->
slave
,
ret
=
openpty
(
&
tty
->
master
,
&
tty
->
slave
,
tty
->
name
,
NULL
,
NULL
);
tty
->
name
,
NULL
,
NULL
);
if
(
ret
)
{
if
(
ret
)
{
...
@@ -1004,11 +1006,21 @@ void lxc_delete_tty(struct lxc_tty_info *ttys)
...
@@ -1004,11 +1006,21 @@ void lxc_delete_tty(struct lxc_tty_info *ttys)
{
{
int
i
;
int
i
;
if
(
!
ttys
->
tty
)
return
;
for
(
i
=
0
;
i
<
ttys
->
max
;
i
++
)
{
for
(
i
=
0
;
i
<
ttys
->
max
;
i
++
)
{
struct
lxc_terminal_info
*
tty
=
&
ttys
->
tty
[
i
];
struct
lxc_terminal_info
*
tty
=
&
ttys
->
tty
[
i
];
close
(
tty
->
master
);
if
(
tty
->
master
>=
0
)
{
close
(
tty
->
slave
);
close
(
tty
->
master
);
tty
->
master
=
-
EBADF
;
}
if
(
tty
->
slave
>=
0
)
{
close
(
tty
->
slave
);
tty
->
slave
=
-
EBADF
;
}
}
}
free
(
ttys
->
tty
);
free
(
ttys
->
tty
);
...
...
src/lxc/start.c
View file @
5c478fb5
...
@@ -619,8 +619,6 @@ void lxc_zero_handler(struct lxc_handler *handler)
...
@@ -619,8 +619,6 @@ void lxc_zero_handler(struct lxc_handler *handler)
memset
(
handler
,
0
,
sizeof
(
struct
lxc_handler
));
memset
(
handler
,
0
,
sizeof
(
struct
lxc_handler
));
handler
->
ns_clone_flags
=
-
1
;
handler
->
pinfd
=
-
1
;
handler
->
pinfd
=
-
1
;
handler
->
sigfd
=
-
1
;
handler
->
sigfd
=
-
1
;
...
...
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