setpgid function

int setpgid(
  1. int pid,
  2. int pgid
)

Set the process group ID of the process matching PID to PGID. If PID is zero, the current process's process group ID is set. If PGID is zero, the process ID of the process is used.

Implementation

int setpgid(
  int pid,
  int pgid,
) {
  _setpgid ??= Libc()
      .dylib
      .lookupFunction<ffi.Int32 Function(ffi.Int32, ffi.Int32), _dart_setpgid>(
          'setpgid');
  return _setpgid!(
    pid,
    pgid,
  );
}