[systemd-devel] logind and sessions tracking questions -

Colin Guthrie gmane at colin.guthr.ie
Wed Jan 22 01:33:37 PST 2014


'Twas brillig, and Djalal Harouni at 20/01/14 12:18 did gyre and gimble:
> Hi Coling,
> 
> Coling please I've some questions regarding what you have posted, see
> below.
> 
> I'm trying to debug another bug in logind logic:
> http://lists.freedesktop.org/archives/systemd-devel/2014-January/015968.html
> 
> I've located some bugs, I've a PoC version working, will post it but
> first need to clear some points here to avoid breaking things.
>> OK, this one is NOT active and is closing. This is likely an older
>> session that has since been replaced after logging out and back in again
>> but it keeps some binaries running (likely gpg-agent stuff at a first
>> guess). Lets look:
>
> Here I assume you are using a new systemd version (Fedora 20)? or
> systemd from git?

I'm on Mageia 4 RC, so systemd v208+patches (very similar set to Fedora 20)


> I noticed in old systemd v204, the "Active" flag would be set to
> "yes"  when we logout and the session keeps some programs running like
> 'screen'! I guess this also applies to gpg-agent...

The two bits here are actually orthoganal.

e.g. the session does not *need* to be active to leave programs like
screen running. The session can be closing (meaning the session leader
has gone), but still leave programs running. Such programs might timeout
after a delay (e.g. pulseaudio does this). Others might actually stick
around longer or indefinitely.

>> Yup, in this case, I have my ssh-agent, gpg-agent and PulseAudio
>> services all loaded under the previous session. They didn't timeout and
>> stop after my logout and as things are not setup to kill all processes,
> Please can you tell me about this last one "kill all processes" ?
> 
> How we set this flag? from my source code analysis I didn't found it and 
> the new man page of pam_systemd does not show it:
> http://www.freedesktop.org/software/systemd/man/pam_systemd.html

See man logind.conf and KillUserProcesses=

HTHs

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the systemd-devel mailing list