diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/procdialogs.cpp | 6 | ||||
-rw-r--r-- | src/proctable.cpp | 5 | ||||
-rw-r--r-- | src/util.h | 3 |
3 files changed, 6 insertions, 8 deletions
diff --git a/src/procdialogs.cpp b/src/procdialogs.cpp index 7d7aace..95b2527 100644 --- a/src/procdialogs.cpp +++ b/src/procdialogs.cpp @@ -25,10 +25,6 @@ #include <signal.h> #include <string.h> -#ifdef HAVE_SYSTEMD -#include <systemd/sd-daemon.h> -#endif - #include "procdialogs.h" #include "proctable.h" #include "callbacks.h" @@ -479,7 +475,7 @@ create_field_page(GtkWidget *tree, const char* text) column_id == COL_SEAT || column_id == COL_OWNER) #ifdef HAVE_SYSTEMD - && sd_booted() <= 0 + && !LOGIND_RUNNING() #endif ) continue; diff --git a/src/proctable.cpp b/src/proctable.cpp index 25b1f36..20f0db5 100644 --- a/src/proctable.cpp +++ b/src/proctable.cpp @@ -45,7 +45,6 @@ #include <list> #ifdef HAVE_SYSTEMD -#include <systemd/sd-daemon.h> #include <systemd/sd-login.h> #endif @@ -488,7 +487,7 @@ proctable_new (ProcData * const procdata) } #ifdef HAVE_SYSTEMD - if (sd_booted() <= 0) + if (!LOGIND_RUNNING()) #endif { GtkTreeViewColumn *column; @@ -756,7 +755,7 @@ get_process_systemd_info(ProcInfo *info) #ifdef HAVE_SYSTEMD uid_t uid; - if (sd_booted() <= 0) + if (!LOGIND_RUNNING()) return; free(info->unit); @@ -28,6 +28,9 @@ inline int procman_cmp(T x, T y) #define PROCMAN_CMP(X, Y) procman_cmp((X), (Y)) #define PROCMAN_RCMP(X, Y) procman_cmp((Y), (X)); +/* check if logind is running */ +#define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0) + GtkWidget* procman_make_label_for_mmaps_or_ofiles(const char *format, const char *process_name, |