]> git.ipfire.org Git - thirdparty/linux.git/commit
tools/nolibc: Provide vfork()
authorMark Brown <broonie@kernel.org>
Thu, 3 Jul 2025 16:00:16 +0000 (17:00 +0100)
committerThomas Weißschuh <linux@weissschuh.net>
Fri, 4 Jul 2025 11:26:12 +0000 (13:26 +0200)
commitfb476dfb13d2f087563b88163167c4b7329462fc
treee5c9640e89d3730258457e33ba642bf2216185fb
parent8c11625afb3042e89d549dcdf7ada220aecd9778
tools/nolibc: Provide vfork()

To allow testing of vfork() support in the arm64 basic-gcs test provide an
implementation for nolibc, using the vfork() syscall if one is available
and otherwise clone3(). We implement in terms of clone3() since the order
of the arguments for clone() varies between architectures.

As for fork() SPARC returns the parent PID rather than 0 in the child
for vfork() so needs custom handling.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20250703-arm64-gcs-vfork-exit-v3-2-1e9a9d2ddbbe@kernel.org
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/arch-sparc.h
tools/include/nolibc/sys.h