The vfork() call is a special implementation of the fork() call.

vfork() is available on about all unices systems.

From the Linux Man Page:

 

.........

 

From the Mac OSX man page:

 

 

 

As you can see from these manual pages the vfork() call has been implemented speed up the inefficient fork() call.

While the vfork() call is useful if you need to launch another process from your running process, you shall take care of it. For example, as shown in POS33, due to the implementation of the vfork() function, the parent process is suspended while the child process executes. If a user sends a signal to the child process, delaying its execution, the parent process (which is privileged) is also blocked. This means that an unprivileged process can cause a privileged process to halt, which is a privilege inversion resulting in a denial of service.

So, yhe best practice is to use the fork() call, however if you need the vfork() for your own project remeber that this call can cause a denial of service without highest privilegies.

 

Gg1