getParentPID method

int getParentPID(
  1. int? childPid
)

Get the PID of the parent Returns -1 if a parent can't be obtained.

Implementation

int getParentPID(int? childPid) {
  if (Settings().isWindows) {
    return _windowsGetParentPid(childPid);
  } else {
    return _linuxGetParentPID(childPid);
  }
}