dup function
Duplicate FD, returning a new file descriptor on the same file.
Implementation
int dup(
int fd,
) {
_dup ??= Libc()
.dylib
.lookupFunction<ffi.Int32 Function(ffi.Int32), _dart_dup>('dup');
return _dup!(
fd,
);
}