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.
This commit is contained in:
Mike Massonnet
2010-05-16 12:07:17 +02:00
parent 8a56b552b5
commit b961822ba4
4 changed files with 90 additions and 126 deletions

View File

@@ -67,8 +67,6 @@ gboolean get_memory_usage (guint64 *memory_total, guint64 *memory_free, guint64
gboolean get_cpu_usage (gushort *cpu_count, gfloat *cpu_user, gfloat *cpu_system);
gboolean get_task_list (GArray *task_list);
gboolean pid_is_sleeping (guint pid);
gboolean send_signal_to_pid (guint pid, gint signal);
gboolean set_priority_to_pid (guint pid, gint priority);
/**
* GObject class used to update the graphical widgets.
@@ -97,5 +95,7 @@ void xtm_task_manager_update_model (XtmTaskManager *manager);
void get_owner_uid (guint *owner_uid, gchar **owner_uid_name);
gchar * get_hostname ();
gboolean send_signal_to_pid (guint pid, gint signal);
gboolean set_priority_to_pid (guint pid, gint priority);
#endif /* !TASK_MANAGER_H */