Extend buffer for reading lines from /proc.

Apparently a line longer than 255 chars was spotted in the wild:
http://serverfault.com/questions/577939/linux-ps-htop-show-processes-running-for-hundreds-or-thousands-of-days-though-h#comment676098_577939
This commit is contained in:
Hisham Muhammad
2015-12-14 13:27:11 -02:00
parent cccc18dd2f
commit 802e216870
3 changed files with 24 additions and 14 deletions

View File

@ -59,6 +59,10 @@ typedef struct LinuxProcessList_ {
#define PROCMEMINFOFILE PROCDIR "/meminfo"
#endif
#ifndef PROC_LINE_LENGTH
#define PROC_LINE_LENGTH 512
#endif
ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, uid_t userId);