Contrary to what the manpage says, GPG agent doesn't appear to forget
passphrases on SIGHUP.
In the following excerpt, I first check that I have the right PID, and that it's
the only running agent. I sign a random file, send a SIGHUP to the agent, then
sign that file again. Though the passphrase should have been forgotten, no query
is made, and the file is re-sign straight away. My PGP key is on an OpenPGP
smart card (with an SCR335 USB reader), and I'm using Poldi for logins.
shtrom@gloduk:~$ cat .gpg-agent-info
GPG_AGENT_INFO=/home/shtrom/.gnupg/S.gpg-agent:5359:1
SSH_AUTH_SOCK=/home/shtrom/.gnupg/S.gpg-agent.ssh
SSH_AGENT_PID=5359
shtrom@gloduk:~$ echo $GPG_AGENT_INFO
/home/shtrom/.gnupg/S.gpg-agent:5359:1
shtrom@gloduk:~$ ps ax | grep 5359
5359 ? Ss 0:36 gpg-agent --daemon --write-env-file
--scdaemon-program /usr/bin/scdaemon --use-standard-socket --default-cache-ttl
43200 --enable-ssh-support --default-cache-ttl-ssh 43200
shtrom@gloduk:~$ ps ax | grep gpg-agent
5359 ? Ss 0:36 gpg-agent --daemon --write-env-file
--scdaemon-program /usr/bin/scdaemon --use-standard-socket --default-cache-ttl
43200 --enable-ssh-support --default-cache-ttl-ssh 43200
shtrom@gloduk:~$ gpg -s 2004ronan_ipsec_performance.pdf
shtrom@gloduk:~$ kill -HUP 5359
shtrom@gloduk:~$ gpg -s 2004ronan_ipsec_performance.pdf
I've noticed this problem on both Gentoo and Arch Linux.