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
33283371
Commit
33283371
authored
Aug 04, 2017
by
Serge Hallyn
Committed by
GitHub
Aug 04, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1729 from brauner/2017-08-03/ensure_cgroup_cleanup_before_restart
start: ensure cgroups are cleaned up
parents
483efec8
4288b79f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
start.c
src/lxc/start.c
+7
-6
No files found.
src/lxc/start.c
View file @
33283371
...
@@ -720,8 +720,14 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
...
@@ -720,8 +720,14 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
handler
->
netnsfd
=
-
1
;
handler
->
netnsfd
=
-
1
;
}
}
cgroup_destroy
(
handler
);
lxc_set_state
(
name
,
handler
,
STOPPED
);
lxc_set_state
(
name
,
handler
,
STOPPED
);
/* close command socket */
close
(
handler
->
conf
->
maincmd_fd
);
handler
->
conf
->
maincmd_fd
=
-
1
;
if
(
run_lxc_hooks
(
name
,
"post-stop"
,
handler
->
conf
,
handler
->
lxcpath
,
NULL
))
{
if
(
run_lxc_hooks
(
name
,
"post-stop"
,
handler
->
conf
,
handler
->
lxcpath
,
NULL
))
{
ERROR
(
"Failed to run lxc.hook.post-stop for container
\"
%s
\"
."
,
name
);
ERROR
(
"Failed to run lxc.hook.post-stop for container
\"
%s
\"
."
,
name
);
if
(
handler
->
conf
->
reboot
)
{
if
(
handler
->
conf
->
reboot
)
{
...
@@ -739,10 +745,6 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
...
@@ -739,10 +745,6 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
lxc_console_delete
(
&
handler
->
conf
->
console
);
lxc_console_delete
(
&
handler
->
conf
->
console
);
lxc_delete_tty
(
&
handler
->
conf
->
tty_info
);
lxc_delete_tty
(
&
handler
->
conf
->
tty_info
);
/* close the command socket */
close
(
handler
->
conf
->
maincmd_fd
);
handler
->
conf
->
maincmd_fd
=
-
1
;
/* The command socket is now closed, no more state clients can register
/* The command socket is now closed, no more state clients can register
* themselves from now on. So free the list of state clients.
* themselves from now on. So free the list of state clients.
*/
*/
...
@@ -755,7 +757,6 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
...
@@ -755,7 +757,6 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
free
(
cur
);
free
(
cur
);
}
}
free
(
handler
->
name
);
if
(
handler
->
ttysock
[
0
]
!=
-
1
)
{
if
(
handler
->
ttysock
[
0
]
!=
-
1
)
{
close
(
handler
->
ttysock
[
0
]);
close
(
handler
->
ttysock
[
0
]);
close
(
handler
->
ttysock
[
1
]);
close
(
handler
->
ttysock
[
1
]);
...
@@ -764,7 +765,7 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
...
@@ -764,7 +765,7 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
if
(
handler
->
conf
->
ephemeral
==
1
&&
handler
->
conf
->
reboot
!=
1
)
if
(
handler
->
conf
->
ephemeral
==
1
&&
handler
->
conf
->
reboot
!=
1
)
lxc_destroy_container_on_signal
(
handler
,
name
);
lxc_destroy_container_on_signal
(
handler
,
name
);
cgroup_destroy
(
handler
);
free
(
handler
->
name
);
free
(
handler
);
free
(
handler
);
}
}
...
...
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