As discussed before (see the 2021 thread "Incorrect thread TID caching") clone() has been effectively unusable because it produces a child process in invalid state, with wrong tid in its thread structure, among other problems. The attached proposed patch attempts to make clone() usable by having it share the _Fork logic for establishing a consistent process state after forking, and also blocks use of flags which produce invalid state. With CLONE_VM, the old behavior is kept, with a caveat that the child context is extremely restrictive, ala vfork. It was raised previously (pardon the pun) that raise() should perhaps be modified to make a SYS_gettid syscall rather than using the thread structure tid, so that it's possible to call raise() in a vfork context without signaling the wrong process. It might make sense to do that now too. Rich