[Andrew]: I noticed that clone3 can send the EACCES errno after I wrote a program that used clone3 with the CLONE_INTO_CGROUP flag. To me, it's important to know what kind of failure occurred if the clone3() fails, so I was glad that a unique errno is set for this case, but it wasn't documented on the clone man page. [Christian]: In essence, any error that could occur during regular fs-based migration at write-time can also occur during CLONE_INTO_CGROUP. The clone3() manpage just has the inverse of that above statement: "Note that all of the usual restrictions (described in cgroups(7)) on placing a process into a version 2 cgroup apply." Reported-by: Andrew Wock <ajwock@xxxxxxxxx> Acked-by: Christian Brauner <christian.brauner@xxxxxxxxxx> Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx> --- man2/clone.2 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/man2/clone.2 b/man2/clone.2 index e381da165..90db92ad6 100644 --- a/man2/clone.2 +++ b/man2/clone.2 @@ -1209,6 +1209,16 @@ in the caller's context, no child process is created, and is set to indicate the error. .SH ERRORS .TP +.BR EACCES " (" clone3 "() only)" +.B CLONE_INTO_CGROUP +was specified in +.IR cl_args.flags , +but the restrictions (described in +.BR cgroups (7)) +on placing the child process into the version 2 cgroup referred to by +.I cl_args.cgroup +are not met. +.TP .B EAGAIN Too many processes are already running; see .BR fork (2). -- 2.33.0