<div dir="ltr">I can confirm lightdm greeter leaves some proccesses behind when it's closed (like dbus-launch, dbus-daemon, at-spi-bus-launcher...) They are only definitely terminated when user logs out from that seat.</div><div class="gmail_extra"><br><div class="gmail_quote">2015-07-07 14:10 GMT-03:00 David Herrmann <span dir="ltr"><<a href="mailto:dh.herrmann@gmail.com" target="_blank">dh.herrmann@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<span class=""><br>
On Tue, Jul 7, 2015 at 6:55 PM, Martin Pitt <<a href="mailto:martin.pitt@ubuntu.com">martin.pitt@ubuntu.com</a>> wrote:<br>
> Hey David,<br>
><br>
> David Herrmann [2015-07-07 18:31 +0200]:<br>
>> > Revert "login: re-use VT-sessions if they already exist" - commit 0204c4b<br>
>> > <a href="http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b" rel="noreferrer" target="_blank">http://cgit.freedesktop.org/systemd/systemd/commit/?id=0204c4b</a><br>
>><br>
>> Can someone elaborate what exactly lightdm does here? We really want<br>
>> to prevent multiple sessions on the same VT. This is just nasty and<br>
>> never made any sense. So I'm really interested why lightdm doesn't<br>
>> kill it's manager-session before it starts the new session. Any<br>
>> particular reason here?<br>
><br>
> I'll let Robert answer with the details, but something I noticed:<br>
><br>
> It's not that simple to reproduce, but sometimes it seems the lightdm<br>
> "greeter" session (running as user lightdm, where you select user/type<br>
> password and so on) doesn't completely terminate, but some processes<br>
> stay around in it. Thus the greeter session stays around in state<br>
> "Closing", and then the "real" session starts on the same VT.<br>
><br>
> I asked the reporter of <a href="https://launchpad.net/bugs/1472259" rel="noreferrer" target="_blank">https://launchpad.net/bugs/1472259</a> to attach<br>
> systemd-cgls, so that we can see what's running in the session.<br>
<br>
</span>So it might indeed just be a race in lightdm. Hmm..<br>
Anyway, this patch here should also fix the issue (if it does, I'll<br>
commit something proper).<br>
<br>
Thanks<br>
David<br>
<br>
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c<br>
index 0cc2cdf..bced693 100644<br>
--- a/src/login/logind-dbus.c<br>
+++ b/src/login/logind-dbus.c<br>
@@ -690,8 +690,11 @@ static int method_create_session<br>
}<br>
<br>
manager_get_session_by_pid(m, leader, &session);<br>
- if (!session && vtnr > 0 && vtnr < m->seat0->position_count)<br>
+ if (!session && vtnr > 0 && vtnr < m->seat0->position_count) {<br>
session = m->seat0->positions[vtnr];<br>
+ if (session && session->class == SESSION_GREETER)<br>
+ session = NULL;<br>
+ }<br>
<span class="im HOEnZb"> if (session) {<br>
_cleanup_free_ char *path = NULL;<br>
_cleanup_close_ int fifo_fd = -1;<br>
</span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><b>Laércio de Sousa</b><br></div><div style="text-align:center"><div style="text-align:left"><i>Orientador de Informática</i></div><div style="text-align:left"><u>Escola Municipal "Professor Eulálio Gruppi"</u></div><div style="text-align:left"><i>Rua Ismael da Silva Mello, 559, Mogi Moderno</i></div><i><div style="text-align:left"><i>Mogi das Cruzes - SP</i></div><div style="text-align:left"><i>CEP 08717-390</i></div></i></div><div><span style="font-family:arial;font-size:small">Telefone: (11) 4726-8313</span></div></div></div>
</div>