vfork function

int vfork()

Clone the calling process, but without copying the whole address space. The calling process is suspended until the new process exits or is replaced by a call to `execve'. Return 0 to the new child process, Returns the process ID of the new process to the parent process.

I have no idea what this will do to a dart process.

Throws PosixException if the operation fails.

Implementation

int vfork() {
  _vfork ??=
      Libc().dylib.lookupFunction<ffi.Int32 Function(), _dart_vfork>('vfork');

  final result = _vfork!();

  _throwIfErrno('vfork', result);

  return result;
}