Is it possible to simulate the behaviour of vfrok with clone? So far I have
pid=clone(fn,cStack,SIGCHLD|CLONE_FS | CLONE_FILES | CLONE_VM | CLONE_VFORK,NULL);
but I still need to pass my own stack, so the new process is working in different stack frame but in the same address space (because of CLONE_VM), and as I understand, if I invoke vfork and don't use some function from exec, the new process is operating in the same address space as the parent, and it uses the same stack frame.
So is it possible to make a new process with clone that operates in the same address space and is using the same stack frame as the parent?