Commit Graph

17 Commits

Author SHA1 Message Date
Landry Breuil
a6fc195392 remove unused variable 2014-12-20 11:25:02 +01:00
Landry Breuil
58689d2683 Fix random crash on an ugly string handling in bsd backend.
Replace an horrible strlcat loop + g_snprintf by g_strjoinv + g_strlcpy.
Assert that the buffer is valid UTF8, blow otherwise.
2014-12-18 22:57:52 +01:00
Landry Breuil
a554ff2e8b Repair memory and swap size calculation on OpenBSD. 2014-12-04 20:35:17 +01:00
Landry Breuil
69f56371ba Silently and gracefully handle the case when a process disappears before we try to get its argv 2014-12-03 18:30:34 +01:00
Landry Breuil
bf7ad9f99e include <sys/vmmeter.h> for struct vmtotal, probably needed on NetBSD 2014-11-29 10:33:49 +01:00
Martin Pieuchot
9d85be6016 On OpenBSD, prefer the UVM way to the vmmeter one to get memory stats. 2014-11-29 10:33:10 +01:00
Landry Breuil
e293a72e0f Include <sys/proc.h> for P_ZOMBIE & SSLEEP macros definition. 2014-01-09 22:10:09 +01:00
Landry Breuil
0984dd8aa3 OpemBSD removed KERN_PROC2/KINFO_PROC2 some months ago, do the #ifdef dance
Effectively merges http://www.openbsd.org/cgi-bin/cvsweb/ports/x11/xfce4/xfce4-taskmanager/patches/patch-src_task-manager-bsd_c?rev=1.1
Keep the old code for NetBSD/DragonflyBSD.
2012-04-23 10:47:49 +02:00
Mike Massonnet
97d2f77ee6 [openbsd] Don't provide memory/swap values in KiB 2010-05-21 13:37:35 +02:00
Landry Breuil
ee9bd057fd Merge branch 'master' of ssh://git.xfce.org/git/apps/xfce4-taskmanager
Conflicts:
	src/task-manager-bsd.c
2010-05-16 12:56:06 +02:00
Landry Breuil
00d6107972 Implement pid_is_sleeping() and fix send_signal_to_pid() 2010-05-16 12:53:50 +02:00
Mike Massonnet
b961822ba4 Move POSIX code to task-manager.c
The functions send_signal_to_pid() and set_priority_to_pid() are using
POSIX functions and “should” be safe in task-manager.c. Still keep the
enumeration as a bridge between virtual values and real values, there is
no benefit removing them (wasting minutes) and it won't make the code
look better (or worse).

The functions have been removed from the Linux and BSD implementations.
2010-05-16 12:30:37 +02:00
Landry Breuil
a721cda4be Set Task name from p_comm field, and cmdline from KERN_PROC_ARGV 2010-05-13 20:07:35 +02:00
Landry Breuil
44dc437214 correctly implement set_priority/send_signal_to_pid() 2010-05-13 19:57:37 +02:00
Landry Breuil
10247249eb Implement fetching of swap stats 2010-05-13 19:56:51 +02:00
Landry Breuil
e5ad1842bf Fix missing includes, remove unused variables 2010-05-13 19:56:10 +02:00
Landry Breuil
3acd330400 WIP on OpenBSD support
- update wrt new Task structure
- handle zombie processes
- get full cmdline
rework
2010-05-13 18:36:17 +02:00