def gids(self): f = open("/proc/%s/status" % self.pid, 'rb') try: GID = b('Gid:') for line in f: if line.startswith(GID): _, real, effective, saved, fs = line.split() return _common.pgids(int(real), int(effective), int(saved)) raise NotImplementedError("line not found") finally: f.close()
def gids(self): real, effective, saved = cext.proc_gids(self.pid) return _common.pgids(real, effective, saved)