chroot function
Make PATH be the root directory (the starting point for absolute paths). This call is restricted to the super-user.
Implementation
int chroot(
String path, // ffi.Pointer<Utf8> __path,
) {
final cPath = path.toNativeUtf8();
_chroot ??= Libc()
.dylib
.lookupFunction<ffi.Int32 Function(ffi.Pointer<Utf8>), _dart_chroot>(
'chroot');
final result = _chroot!(
cPath,
);
malloc.free(cPath);
return result;
}