acct function

int acct(
  1. String name
)

Turn accounting on if NAME is an existing file. The system will then write a record for each process as it terminates, to this file. If NAME is NULL, turn accounting off. This call is restricted to the super-user.

Implementation

int acct(
  String name, // ffi.Pointer<Utf8> name,
) {
  final cName = name.toNativeUtf8();

  _acct ??= Libc()
      .dylib
      .lookupFunction<ffi.Int32 Function(ffi.Pointer<Utf8>), _dart_acct>(
          'acct');
  final result = _acct!(
    cName,
  );

  malloc.free(cName);
  return result;
}