[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-4-0' - common/Util.cpp
Michael Meeks (via logerrit)
logerrit at kemper.freedesktop.org
Fri Feb 14 22:33:56 UTC 2020
common/Util.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 7091f57b358fd06a236b96cc91990251bba8ea6e
Author: Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Jan 20 19:33:00 2020 +0000
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri Feb 14 23:33:38 2020 +0100
util: for process thread count - ignore '.' and '..' in /proc/self/tasks
Change-Id: Ieec6eaac475b4e318578cfc0d93c36e2395e6f19
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87097
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 09bb16ad78f71e285b6059774ce089b9ef1d006b)
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87110
diff --git a/common/Util.cpp b/common/Util.cpp
index 2a0151615..253c4a35e 100644
--- a/common/Util.cpp
+++ b/common/Util.cpp
@@ -157,8 +157,12 @@ namespace Util
return -1;
}
int tasks = 0;
- while (readdir(fdDir))
- tasks++;
+ struct dirent *i;
+ while ((i = readdir(fdDir)))
+ {
+ if (i->d_name[0] != '.')
+ tasks++;
+ }
closedir(fdDir);
return tasks;
}
More information about the Libreoffice-commits
mailing list