1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-21 02:50:18 +03:00

logind: consider key inhibitors that are taken by non-session processes as global

This should allow system services to take over key handling for all
sessions, globally.
This commit is contained in:
Lennart Poettering 2013-04-05 18:57:58 +02:00
parent 79d860fe78
commit 2c4f86c129

View File

@ -354,9 +354,14 @@ static int pid_is_active(Manager *m, pid_t pid) {
int r;
r = manager_get_session_by_pid(m, pid, &s);
if (r <= 0)
if (r < 0)
return r;
/* If there's no session assigned to it, then it's globally
* active on all ttys */
if (r == 0)
return 1;
return session_is_active(s);
}