diff options
author | Daniel Lange <DLange@git.local> | 2021-10-15 09:03:04 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2021-10-15 09:03:04 +0200 |
commit | 30ce3b4c264c51c98f280e88e23792ff7deb2317 (patch) | |
tree | f9730c54ab9d86ce57ce636f2fba1fdc03f46072 /pcp/PCPMetric.c | |
parent | 69f439eff387a6ecb52734e400b297a3c85f2285 (diff) | |
download | debian_htop-30ce3b4c264c51c98f280e88e23792ff7deb2317.tar.gz debian_htop-30ce3b4c264c51c98f280e88e23792ff7deb2317.tar.bz2 debian_htop-30ce3b4c264c51c98f280e88e23792ff7deb2317.zip |
New upstream version 3.1.1upstream/3.1.1
Diffstat (limited to 'pcp/PCPMetric.c')
-rw-r--r-- | pcp/PCPMetric.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pcp/PCPMetric.c b/pcp/PCPMetric.c index c8cfe71..f6d4c97 100644 --- a/pcp/PCPMetric.c +++ b/pcp/PCPMetric.c @@ -2,7 +2,7 @@ htop - PCPMetric.c (C) 2020-2021 htop dev team (C) 2020-2021 Red Hat, Inc. -Released under the GNU GPLv2, see the COPYING file +Released under the GNU GPLv2+, see the COPYING file in the source distribution for its full text. */ @@ -164,7 +164,10 @@ bool PCPMetric_fetch(struct timeval* timestamp) { pmFreeResult(pcp->result); pcp->result = NULL; } - int sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result); + int sts, count = 0; + do { + sts = pmFetch(pcp->totalMetrics, pcp->fetch, &pcp->result); + } while (sts == PM_ERR_IPC && ++count < 3); if (sts < 0) { if (pmDebugOptions.appl0) fprintf(stderr, "Error: cannot fetch metric values: %s\n", |