Hi On Mon, Dec 2, 2013 at 8:17 PM, Colin Walters <walt...@verbum.org> wrote: > On Mon, 2013-12-02 at 14:37 +0100, David Herrmann wrote: > >> But then gnome-session should simply call ReleaseSession() on the bus >> itself.. > > I'd rather have some sort of API where a particular process is the > "session leader", and its exit implies closing. Something like a pid > file in /run/systemd/sessions/c0/leader/pid which is owned by the > session's uid/gid?
There is no sane way to watch for specific childs in systemd-logind. We don't have a childfd(2) call or poll(2) on /proc/<pid>... So we usually just apply this policy on the first process in a session (which we get SIGCHLD for). Once it exists, we mark the session as closing. I think that's a good compromise. But for the ssh case we'd need something to inhibit this behavior. Like a bus call Session.KeepOpen() which keeps the session open until the caller closes the bus-connection. Thanks David _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel