Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   __clone2    ( 2 )

создать дочерний процесс (create a child process)

  Name  |  Synopsis  |  Description  |  Return value  |    Error    |  Versions  |  Conforming to  |  Note  |  Bugs  |  Examples  |  See also  |

Ошибки (Error)

EAGAIN Too many processes are already running; see fork(2).

EBUSY (clone3() only) CLONE_INTO_CGROUP was specified in cl_args.flags, but the file descriptor specified in cl_args.cgroup refers to a version 2 cgroup in which a domain controller is enabled.

EEXIST (clone3() only) One (or more) of the PIDs specified in set_tid already exists in the corresponding PID namespace.

EINVAL Both CLONE_SIGHAND and CLONE_CLEAR_SIGHAND were specified in the flags mask.

EINVAL CLONE_SIGHAND was specified in the flags mask, but CLONE_VM was not. (Since Linux 2.6.0.)

EINVAL CLONE_THREAD was specified in the flags mask, but CLONE_SIGHAND was not. (Since Linux 2.5.35.)

EINVAL CLONE_THREAD was specified in the flags mask, but the current process previously called unshare(2) with the CLONE_NEWPID flag or used setns(2) to reassociate itself with a PID namespace.

EINVAL Both CLONE_FS and CLONE_NEWNS were specified in the flags mask.

EINVAL (since Linux 3.9) Both CLONE_NEWUSER and CLONE_FS were specified in the flags mask.

EINVAL Both CLONE_NEWIPC and CLONE_SYSVSEM were specified in the flags mask.

EINVAL One (or both) of CLONE_NEWPID or CLONE_NEWUSER and one (or both) of CLONE_THREAD or CLONE_PARENT were specified in the flags mask.

EINVAL (since Linux 2.6.32) CLONE_PARENT was specified, and the caller is an init process.

EINVAL Returned by the glibc clone() wrapper function when fn or stack is specified as NULL.

EINVAL CLONE_NEWIPC was specified in the flags mask, but the kernel was not configured with the CONFIG_SYSVIPC and CONFIG_IPC_NS options.

EINVAL CLONE_NEWNET was specified in the flags mask, but the kernel was not configured with the CONFIG_NET_NS option.

EINVAL CLONE_NEWPID was specified in the flags mask, but the kernel was not configured with the CONFIG_PID_NS option.

EINVAL CLONE_NEWUSER was specified in the flags mask, but the kernel was not configured with the CONFIG_USER_NS option.

EINVAL CLONE_NEWUTS was specified in the flags mask, but the kernel was not configured with the CONFIG_UTS_NS option.

EINVAL stack is not aligned to a suitable boundary for this architecture. For example, on aarch64, stack must be a multiple of 16.

EINVAL (clone3() only) CLONE_DETACHED was specified in the flags mask.

EINVAL (clone() only) CLONE_PIDFD was specified together with CLONE_DETACHED in the flags mask.

EINVAL CLONE_PIDFD was specified together with CLONE_THREAD in the flags mask.

EINVAL (clone() only) CLONE_PIDFD was specified together with CLONE_PARENT_SETTID in the flags mask.

EINVAL (clone3() only) set_tid_size is greater than the number of nested PID namespaces.

EINVAL (clone3() only) One of the PIDs specified in set_tid was an invalid.

EINVAL (AArch64 only, Linux 4.6 and earlier) stack was not aligned to a 128-bit boundary.

ENOMEM Cannot allocate sufficient memory to allocate a task structure for the child, or to copy those parts of the caller's context that need to be copied.

ENOSPC (since Linux 3.7) CLONE_NEWPID was specified in the flags mask, but the limit on the nesting depth of PID namespaces would have been exceeded; see pid_namespaces(7).

ENOSPC (since Linux 4.9; beforehand EUSERS) CLONE_NEWUSER was specified in the flags mask, and the call would cause the limit on the number of nested user namespaces to be exceeded. See user_namespaces(7).

From Linux 3.11 to Linux 4.8, the error diagnosed in this case was EUSERS.

ENOSPC (since Linux 4.9) One of the values in the flags mask specified the creation of a new user namespace, but doing so would have caused the limit defined by the corresponding file in /proc/sys/user to be exceeded. For further details, see namespaces(7).

EOPNOTSUPP (clone3() only) CLONE_INTO_CGROUP was specified in cl_args.flags, but the file descriptor specified in cl_args.cgroup refers to a version 2 cgroup that is in the domain invalid state.

EPERM CLONE_NEWCGROUP, CLONE_NEWIPC, CLONE_NEWNET, CLONE_NEWNS, CLONE_NEWPID, or CLONE_NEWUTS was specified by an unprivileged process (process without CAP_SYS_ADMIN).

EPERM CLONE_PID was specified by a process other than process 0. (This error occurs only on Linux 2.5.15 and earlier.)

EPERM CLONE_NEWUSER was specified in the flags mask, but either the effective user ID or the effective group ID of the caller does not have a mapping in the parent namespace (see user_namespaces(7)).

EPERM (since Linux 3.9) CLONE_NEWUSER was specified in the flags mask and the caller is in a chroot environment (i.e., the caller's root directory does not match the root directory of the mount namespace in which it resides).

EPERM (clone3() only) set_tid_size was greater than zero, and the caller lacks the CAP_SYS_ADMIN capability in one or more of the user namespaces that own the corresponding PID namespaces.

ERESTARTNOINTR (since Linux 2.6.17) System call was interrupted by a signal and will be restarted. (This can be seen only during a trace.)

EUSERS (Linux 3.11 to Linux 4.8) CLONE_NEWUSER was specified in the flags mask, and the limit on the number of nested user namespaces would be exceeded. See the discussion of the ENOSPC error above.