gpg-agent and scdaemon still running after log out
Closed, WontfixPublic


GnuPG 2.2.8 on 64-bit linux, compiled with GCC 7.3.0

After logging out, I could not dismount /home because there were about a dozen instances of gpg-agent and scdaemon still running. I wasn't even using a smart card. This cannot be the correct behavior. gpg-agent should not continue running after the user is logged out.


werner added a subscriber: werner.Jul 16 2018, 9:19 AM

There should be only one instance of gpg-agent running per GNUPGHOME directory (i.e per user). Is this a systemd system where you started gpg-agent in supervised mode (e.g. Debian) or a regular system. What is special in your setup?

Nothing special at all. Using sysvinit, not systemd.
Ran gpg and gpa as a regular user a few times. Then, after logging out, I found those processes still running.

I can't reproduce the problem with multiple instances of gpg-agent and scdaemon.
However, gpg-agent continues to run after the user has logged out. This is unacceptable, am I right?

werner closed this task as Wontfix.Nov 14 2018, 2:34 PM
werner claimed this task.

It is useful if you often log out and in, for example using remote remote ssh session. If you don't like it, you should "gpgconf --kill gpg-agent" in your .bash_logout. ~/.xsession or whatever your system uses. Instead of --kill you can also use --reload so that the passphrase cache is flushed immediately and not only at the end of the TTL.