diff options
author | kremlin <ian@kremlin.cc> | 2014-07-29 15:40:03 +0800 |
---|---|---|
committer | kremlin <ian@kremlin.cc> | 2014-07-29 15:40:03 +0800 |
commit | f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2 (patch) | |
tree | cab65d4ea39364459424a8922774b04818343c3f /src/interfaces/logind/logind.c | |
parent | eb20fe6d701a9921bccf54797f4b8b0054fdee1d (diff) | |
download | systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.gz systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.bz2 systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.lz systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.xz systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.tar.zst systembsd-f50e1f3bb9837435224a6ce3a7ecd078f8ba86a2.zip |
(3) add needed GLib headers, move loop and bus descr out of main into global
minor variable placement changes. added gboolean dbus_interface_exported,
which due to the guarantees of the name_lost, bus_acquired, and name_acquired
is a reliable source of whether not it is reasonable to try and unexport it
Diffstat (limited to 'src/interfaces/logind/logind.c')
-rw-r--r-- | src/interfaces/logind/logind.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/interfaces/logind/logind.c b/src/interfaces/logind/logind.c index bb740a7..3b9cab6 100644 --- a/src/interfaces/logind/logind.c +++ b/src/interfaces/logind/logind.c @@ -16,6 +16,7 @@ #include <unistd.h> #include <limits.h> +#include <signal.h> #include <sys/param.h> #include <string.h> @@ -29,6 +30,11 @@ GPtrArray *logind_freeable; Login1Manager *logind_interf; +GMainLoop *logind_loop; + +guint bus_descriptor; +gboolean dbus_interface_exported; /* reliable because of gdbus operational guarantees */ + /* --- begin method/property/dbus signal code --- */ /*static gboolean @@ -114,9 +120,6 @@ void logind_mem_clean() { int main() { - guint bus_descriptor; - GMainLoop *logind_loop; - logind_loop = g_main_loop_new(NULL, TRUE); logind_freeable = g_ptr_array_new(); |