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
d523cf59
Unverified
Commit
d523cf59
authored
Oct 09, 2018
by
Stéphane Graber
Committed by
GitHub
Oct 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2684 from brauner/2018-10-10/cgfsng_improve_logging
cgfsng: improve deletion and logging
parents
e2103b18
d5fc4dd4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
cgfsng.c
src/lxc/cgroups/cgfsng.c
+14
-2
No files found.
src/lxc/cgroups/cgfsng.c
View file @
d523cf59
...
@@ -1152,6 +1152,7 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
...
@@ -1152,6 +1152,7 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
for
(
int
i
=
0
;
ops
->
hierarchies
[
i
];
i
++
)
{
for
(
int
i
=
0
;
ops
->
hierarchies
[
i
];
i
++
)
{
int
ret
;
int
ret
;
char
*
chop
;
struct
hierarchy
*
h
=
ops
->
hierarchies
[
i
];
struct
hierarchy
*
h
=
ops
->
hierarchies
[
i
];
if
(
!
h
->
monitor_full_path
)
if
(
!
h
->
monitor_full_path
)
...
@@ -1169,16 +1170,27 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
...
@@ -1169,16 +1170,27 @@ __cgfsng_ops static void cgfsng_monitor_destroy(struct cgroup_ops *ops,
PIVOT_CGROUP
,
PIVOT_CGROUP
,
"cgroup.procs"
,
NULL
);
"cgroup.procs"
,
NULL
);
chop
=
strrchr
(
pivot_path
,
'/'
);
if
(
chop
)
*
chop
=
'\0'
;
ret
=
mkdir_p
(
pivot_path
,
0755
);
ret
=
mkdir_p
(
pivot_path
,
0755
);
if
(
ret
<
0
&&
errno
!=
EEXIST
)
if
(
ret
<
0
&&
errno
!=
EEXIST
)
{
SYSWARN
(
"Failed to create cgroup
\"
%s
\"\n
"
,
pivot_path
);
goto
next
;
goto
next
;
}
if
(
chop
)
*
chop
=
'/'
;
/* Move ourselves into the pivot cgroup to delete our own
/* Move ourselves into the pivot cgroup to delete our own
* cgroup.
* cgroup.
*/
*/
ret
=
lxc_write_to_file
(
pivot_path
,
pidstr
,
len
,
false
,
0666
);
ret
=
lxc_write_to_file
(
pivot_path
,
pidstr
,
len
,
false
,
0666
);
if
(
ret
!=
0
)
if
(
ret
!=
0
)
{
SYSWARN
(
"Failed to move monitor %s to
\"
%s
\"\n
"
,
pidstr
,
pivot_path
);
goto
next
;
goto
next
;
}
ret
=
recursive_destroy
(
h
->
monitor_full_path
);
ret
=
recursive_destroy
(
h
->
monitor_full_path
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
...
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