aarch64: add vfork
commit4f48da008d1fb3ccab2ad76523c104aa3fa8d8b6
authorSzabolcs Nagy <nsz@port70.net>
Sat, 16 Jul 2022 13:55:51 +0000 (16 15:55 +0200)
committerRich Felker <dalias@aerifal.cx>
Mon, 1 Aug 2022 17:37:39 +0000 (1 13:37 -0400)
treebbd789ccc386052dcbf4e8952a31a6a9696e5dfb
parent7d568410b455390362e2bcfb7c50fcf9c8833d9b
aarch64: add vfork

The generic vfork implementation uses clone(SIGCHLD) which has fork
semantics.

Implement vfork as clone(SIGCHLD|CLONE_VM|CLONE_VFORK, 0) instead which
has vfork semantics. (stack == 0 means sp is unchanged in the child.)

Some users rely on vfork semantics when memory overcommit is disabled
or when the vfork child runs code that synchronizes with the parent
process (non-conforming).
src/process/aarch64/vfork.s [new file with mode: 0644]