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
ff4e4629
Unverified
Commit
ff4e4629
authored
Feb 10, 2021
by
Stéphane Graber
Committed by
GitHub
Feb 10, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3664 from brauner/2021-02-10/fixes
cgroups: fixes
parents
ae2d267e
25db3f94
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
cgfsng.c
src/lxc/cgroups/cgfsng.c
+9
-2
No files found.
src/lxc/cgroups/cgfsng.c
View file @
ff4e4629
...
...
@@ -1483,13 +1483,17 @@ __cgfsng_ops static bool cgfsng_monitor_enter(struct cgroup_ops *ops,
if
(
ret
)
return
log_error_errno
(
false
,
errno
,
"Failed to enter cgroup
\"
%s
\"
"
,
h
->
monitor_full_path
);
TRACE
(
"Moved monitor into %s cgroup via %d"
,
h
->
monitor_full_path
,
h
->
cgfd_mon
);
if
(
handler
->
transient_pid
<=
0
)
return
tr
ue
;
contin
ue
;
ret
=
lxc_writeat
(
h
->
cgfd_mon
,
"cgroup.procs"
,
transient
,
transient_len
);
if
(
ret
)
return
log_error_errno
(
false
,
errno
,
"Failed to enter cgroup
\"
%s
\"
"
,
h
->
monitor_full_path
);
TRACE
(
"Moved transient process into %s cgroup via %d"
,
h
->
monitor_full_path
,
h
->
cgfd_mon
);
/*
* we don't keep the fds for non-unified hierarchies around
* mainly because we don't make use of them anymore after the
...
...
@@ -1528,12 +1532,15 @@ __cgfsng_ops static bool cgfsng_payload_enter(struct cgroup_ops *ops,
struct
hierarchy
*
h
=
ops
->
hierarchies
[
i
];
int
ret
;
if
(
is_unified_hierarchy
(
h
)
&&
handler
->
clone_flags
&
CLONE_INTO_CGROUP
)
if
(
is_unified_hierarchy
(
h
)
&&
(
handler
->
clone_flags
&
CLONE_INTO_CGROUP
))
continue
;
ret
=
lxc_writeat
(
h
->
cgfd_con
,
"cgroup.procs"
,
pidstr
,
len
);
if
(
ret
!=
0
)
return
log_error_errno
(
false
,
errno
,
"Failed to enter cgroup
\"
%s
\"
"
,
h
->
container_full_path
);
TRACE
(
"Moved container into %s cgroup via %d"
,
h
->
container_full_path
,
h
->
cgfd_con
);
}
return
true
;
...
...
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