projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
988ca09
)
process-util: check the flag instead of 'cgroup' param
author
Mike Yuan
<me@yhndnzj.com>
Tue, 20 Aug 2024 20:01:09 +0000
(22:01 +0200)
committer
Mike Yuan
<me@yhndnzj.com>
Wed, 21 Aug 2024 13:17:05 +0000
(15:17 +0200)
We might skip CLONE_INTO_CGROUP wholly if not supported.
src/basic/process-util.c
patch
|
blob
|
history
diff --git
a/src/basic/process-util.c
b/src/basic/process-util.c
index a247b5a0b25246684fff76ca0b2b87170af931e7..711457fa7b70dff1ea504782f9597cc9c80bb2ed 100644
(file)
--- a/
src/basic/process-util.c
+++ b/
src/basic/process-util.c
@@
-2118,7
+2118,7
@@
int posix_spawn_wrapper(
}
if (ERRNO_IS_NOT_SUPPORTED(r)) {
/* clone3() could also return EOPNOTSUPP if the target cgroup is in threaded mode. */
- if (
cgroup
&& cg_is_threaded(cgroup) > 0)
+ if (
FLAGS_SET(flags, POSIX_SPAWN_SETCGROUP)
&& cg_is_threaded(cgroup) > 0)
return -EUCLEAN;
/* clone3() not available? */