mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
Handle interrupted sampling from within libpcp PDU transfers
This situation can arise if pcp-htop screen is resized right at the same time sampling from pmcd(1) is happening. Have a couple more goes at it before giving up entirely; once there is no data available though we cannot proceed into accessing the sample result data structure (segv will result) so a new short-circuit guard is added there also.
This commit is contained in:
@ -680,7 +680,8 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
|
||||
PCPMetric_enable(PCP_PROC_SMAPS_SWAPPSS, smaps_flag && enabled);
|
||||
|
||||
struct timeval timestamp;
|
||||
PCPMetric_fetch(×tamp);
|
||||
if (PCPMetric_fetch(×tamp) != true)
|
||||
return;
|
||||
|
||||
double sample = this->timestamp;
|
||||
this->timestamp = pmtimevalToReal(×tamp);
|
||||
|
Reference in New Issue
Block a user