mirror of https://github.com/xzeldon/htop.git
Linux: fix CPU count
This commit is contained in:
parent
e9f95da559
commit
e1c2dc56fd
|
@ -245,7 +245,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
|
||||||
if (file == NULL) {
|
if (file == NULL) {
|
||||||
CRT_fatalError("Cannot open " PROCSTATFILE);
|
CRT_fatalError("Cannot open " PROCSTATFILE);
|
||||||
}
|
}
|
||||||
int cpus = -1;
|
int cpus = 0;
|
||||||
do {
|
do {
|
||||||
char buffer[PROC_LINE_LENGTH + 1];
|
char buffer[PROC_LINE_LENGTH + 1];
|
||||||
if (fgets(buffer, PROC_LINE_LENGTH + 1, file) == NULL) {
|
if (fgets(buffer, PROC_LINE_LENGTH + 1, file) == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue