diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-06-12 20:34:42 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-06-12 20:44:33 +0200 |
commit | df752dd189c07738a88d2b74d4796613a9157dc3 (patch) | |
tree | e87daaf954d63be4f587901145da3ff89b72d894 /linux | |
parent | 45ab05c56af8c57c6f357d4de0926d29b188c348 (diff) |
Do not override Linux process library size
The library size in statm is unused and always 0 since Linux 2.6.
Fixes: 8154125d4bf26fff20241eebe17954254409a522
Diffstat (limited to 'linux')
-rw-r--r-- | linux/LinuxProcessList.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/linux/LinuxProcessList.c b/linux/LinuxProcessList.c index 8500ffa6..356bb759 100644 --- a/linux/LinuxProcessList.c +++ b/linux/LinuxProcessList.c @@ -625,12 +625,14 @@ static bool LinuxProcessList_readStatmFile(LinuxProcess* process, openat_arg_t p if (!statmfile) return false; + long int dummy; + int r = fscanf(statmfile, "%ld %ld %ld %ld %ld %ld %ld", &process->super.m_virt, &process->super.m_resident, &process->m_share, &process->m_trs, - &process->m_lrs, + &dummy, /* unused since Linux 2.6; always 0 */ &process->m_drs, &process->m_dt); fclose(statmfile); |