summaryrefslogtreecommitdiffstats
path: root/kicker/applets/naughty
diff options
context:
space:
mode:
authorFrançois Andriot <francois.andriot@free.fr>2014-10-12 20:12:42 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-10-12 20:12:42 +0200
commit54a7c726b7c7a9a1ca24305bda63c113c210cd66 (patch)
treeea4b3024548202abb89e2843cb016d771645451d /kicker/applets/naughty
parent3cc6437abb62c169c1aa777cfc7d34383f7dc69f (diff)
downloadtdebase-54a7c726b7c7a9a1ca24305bda63c113c210cd66.tar.gz
tdebase-54a7c726b7c7a9a1ca24305bda63c113c210cd66.zip
Fix process detection in kicker applet naughtyprocessmonitor on openbsd
Diffstat (limited to 'kicker/applets/naughty')
-rw-r--r--kicker/applets/naughty/NaughtyProcessMonitor.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/kicker/applets/naughty/NaughtyProcessMonitor.cpp b/kicker/applets/naughty/NaughtyProcessMonitor.cpp
index c71ba6e2f..dbd3a0580 100644
--- a/kicker/applets/naughty/NaughtyProcessMonitor.cpp
+++ b/kicker/applets/naughty/NaughtyProcessMonitor.cpp
@@ -409,12 +409,21 @@ NaughtyProcessMonitor::pidList() const
d->cacheLoadMap_.clear () ;
d->uidMap_.clear () ;
for (i = 0; i < nentries; i++) {
+#ifdef __OpenBSD__
+ l << (unsigned long) kp[i].p_pid ;
+ d->cacheLoadMap_.insert (kp[i].p_pid,
+ (kp[i].p_uticks +
+ kp[i].p_sticks)) ;
+ d->uidMap_.insert (kp[i].p_pid,
+ kp[i].p_uid) ;
+#else
l << (unsigned long) kp[i].kp_proc.p_pid ;
d->cacheLoadMap_.insert (kp[i].kp_proc.p_pid,
(kp[i].kp_proc.p_uticks +
kp[i].kp_proc.p_sticks)) ;
d->uidMap_.insert (kp[i].kp_proc.p_pid,
kp[i].kp_eproc.e_ucred.cr_uid) ;
+#endif
}
free (kp) ;