diff --git a/Process.h b/Process.h index fce5017d..e9c42622 100644 --- a/Process.h +++ b/Process.h @@ -76,10 +76,10 @@ typedef struct Process_ { pid_t tgid; /* Process group identifier */ - unsigned int pgrp; + int pgrp; /* Session identifier */ - unsigned int session; + int session; /* Foreground group identifier of the controlling terminal */ int tpgid; diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 5c15c2e1..081b31e0 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -316,11 +316,11 @@ static bool LinuxProcessList_readStatFile(Process* process, openat_arg_t procFd, location += 1; /* (5) pgrp - %d */ - process->pgrp = strtoul(location, &location, 10); + process->pgrp = strtol(location, &location, 10); location += 1; /* (6) session - %d */ - process->session = strtoul(location, &location, 10); + process->session = strtol(location, &location, 10); location += 1; /* (7) tty_nr - %d */