fork function

int fork()

Clone the calling process, creating an exact copy. Return 0 to the new process, and the process ID of the new process to the old process.

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

Throws PosixException if the operation fails.

Implementation

int fork() {
  _fork ??=
      Libc().dylib.lookupFunction<ffi.Int32 Function(), _dart_fork>('fork');

  final result = _fork!();

  _throwIfErrno('fork', result);

  return result;
}