summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
Diffstat (limited to 'src/login')
-rw-r--r--src/login/logind-dbus.c2
-rw-r--r--src/login/logind-session.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index ef0c13bc0..ede92822d 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -860,6 +860,8 @@ static int method_release_session(sd_bus_message *message, void *userdata, sd_bu
if (r < 0)
return r;
+ session_add_to_gc_queue(session);
+
return sd_bus_reply_method_return(message, NULL);
}
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index 1a3567194..b5e4bee9e 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -40,7 +40,7 @@
#include "formats-util.h"
#include "terminal-util.h"
-#define RELEASE_USEC (20*USEC_PER_SEC)
+// #define RELEASE_USEC (20*USEC_PER_SEC)
static void session_remove_fifo(Session *s);
@@ -726,6 +726,8 @@ int session_finalize(Session *s) {
return 0;
}
+/// UNNEEDED by elogind
+#if 0
static int release_timeout_callback(sd_event_source *es, uint64_t usec, void *userdata) {
Session *s = userdata;
@@ -735,6 +737,7 @@ static int release_timeout_callback(sd_event_source *es, uint64_t usec, void *us
session_stop(s, false);
return 0;
}
+#endif // 0
int session_release(Session *s) {
assert(s);
@@ -745,11 +748,19 @@ int session_release(Session *s) {
if (s->timer_event_source)
return 0;
+ /* In systemd, session release is triggered by user jobs
+ dying. In elogind we don't have that so go ahead and stop
+ now. */
+#if 0
return sd_event_add_time(s->manager->event,
&s->timer_event_source,
CLOCK_MONOTONIC,
now(CLOCK_MONOTONIC) + RELEASE_USEC, 0,
release_timeout_callback, s);
+
+#else
+ return session_stop(s, false);
+#endif // 0
}
bool session_is_active(Session *s) {