Yesterday, I had a uncommon behaviour when shutting down my computer. KDE told
me, that there is still a session active on VT6 and if I want to abort this
session. I switched to VT6 and I had a login prompt, so I this session already
has been closed.
Today, I tried to reproduce this problem by re-doing the tasks, I did on this
terminal and I found out, that gpg seems to modify /var/run/utmp in some way,
the session is still reported open even after I type in "exit". This only seems
to happen when importing new keys via "gpg --import".
To reproduce, you may just login to any VT as root. Now delete/move your
~/.gnupg and import a new key. At next, I verified some files against their
signature. If you now logout, then a entry for this VT still is kept in
/var/run/utmp for any reason.
I have gpg 1.4.9 on my system.