[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdebase/ksysguard/ksysguardd/FreeBSD
From:       Hasso Tepper <hasso () kde ! org>
Date:       2007-05-01 11:23:08
Message-ID: 1178018588.771441.8634.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 660037 by hasso:

Backport 660029.


 M  +8 -3      ProcessList.c  


--- branches/KDE/3.5/kdebase/ksysguard/ksysguardd/FreeBSD/ProcessList.c #660036:660037
@@ -384,13 +384,18 @@
 	for (num = 0; num < len / sizeof(struct kinfo_proc); num++)
 #if __FreeBSD_version >= 500015
 		updateProcess(p[num].ki_pid);
-#else
-#if __DragonFly_version >= 190000
+#elif __DragonFly_version >= 190000
+            /* Skip kernel threads with pid -1. Swapper with pid 0 also
+             * causing problems is skipped in printProcessList() as 'kernel'
+             * entry. */
+            if (p[num].kp_pid >= 0)
 		updateProcess(p[num].kp_pid);
+#elif defined(__DragonFly__)
+            if (p[num].kp_proc.p_pid >= 0)
+		updateProcess(p[num].kp_proc.p_pid);
 #else
 		updateProcess(p[num].kp_proc.p_pid);
 #endif
-#endif
 	free(p);
 	cleanupProcessList();
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic