After reading the manual, it again becomes clear that there are two vfork descriptions:
The POSIX standard description states that after vfork , one of the exec(3) functions must be called.
The Linux description says that after vfork you need to call execve(2) (and only execve ).
Itβs not clear to me whether the POSIX standard description corresponds to the corresponding implementation that allows calling any of the exec functions. One possible indication of the standard description is that the implementation can decide which exec functions are allowed (and only requires at least one of them to be enabled after vfork ).
In any case, it is clear that Linux allows execve (and only execve *) to be called after vfork . The POSIX standard may allow other exec functions, but Linux does not work.
* Well, of course, it can call _exit too, but I ignore _exit in this Q & A.
source share