getgrgid function

Group getgrgid(
  1. int gid
)

Search for an entry with a matching group ID.

This function is a possible cancellation point and therefore not marked with __THROW.

Implementation

Group getgrgid(
  int gid,
) {
  clearErrno();
  _getgrgid ??= Libc()
      .dylib
      .lookupFunction<ffi.Pointer<group> Function(ffi.Uint32), _dart_getgrgid>(
          'getgrgid');
  return _buildGroup(
      _getgrgid!(
        gid,
      ),
      'Error occured attempting to get the next group entry for gid: $gid');
}