native_execv function
Execute PATH with arguments ARGV and environment from `environ'.
Implementation
int native_execv(
String path, // ffi.Pointer<Utf8> __path,
ffi.Pointer<ffi.Pointer<Utf8>> __argv,
) {
final cPath = path.toNativeUtf8();
_execv ??= Libc().dylib.lookupFunction<
ffi.Int32 Function(ffi.Pointer<Utf8>, ffi.Pointer<ffi.Pointer<Utf8>>),
_dart_execv>('execv');
final result = _execv!(
cPath,
__argv,
);
malloc.free(cPath);
return result;
}