summaryrefslogtreecommitdiff
path: root/src/login/logind-session.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-04 19:01:56 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-05 22:50:09 +0200
commite11544a8305ab9dea097c74bb16e296150c9cc10 (patch)
tree271f542db832c5af73082aaf78f8fa528ef747c4 /src/login/logind-session.c
parent89f193fac8e1b85936e32455ed7a5ea6b43d6508 (diff)
logind: process session/inhibitor fds at higher priority
Let's make sure we process session and inhibitor pipe fds (that signal sessions/inhibtors going away) at a higher priority than new bus calls that might create new sessions or inhibitors. This helps ensuring that the number of open sessions stays minimal.
Diffstat (limited to 'src/login/logind-session.c')
-rw-r--r--src/login/logind-session.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index a8b1d5943d..d2f1f7bc62 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -897,7 +897,9 @@ int session_create_fifo(Session *s) {
if (r < 0)
return r;
- r = sd_event_source_set_priority(s->fifo_event_source, SD_EVENT_PRIORITY_IDLE);
+ /* Let's make sure we noticed dead sessions before we process new bus requests (which might create new
+ * sessions). */
+ r = sd_event_source_set_priority(s->fifo_event_source, SD_EVENT_PRIORITY_NORMAL-10);
if (r < 0)
return r;
}