The ssh_and_gpg_agents scriptlet fails on GPG when hibernate is called from an ACPI event, like the power button. It generates a list of PIDs with ps t - | gawk '/gpg-agent --daemon/ {print $1}' which also gives the PID of the gawk process. The script then fails when it tries too kill this, now non-existent, PID. This patch alters the script to check that a PID still exists before trying to kill it.
Created attachment 190510 [details, diff] Patch for ssh_and_gpg_agents scriptlet
Should'nt this be reported upstream ? Thanks for the patch.
I see that 2.0-r4 has exactly the same problem, fixed by the same patch. I'll try reporting upstream but I thought the protocol was for Gentoo users to file bugs here and devs to pass upstream as appropriate. Incidentally, I had to modify the ebuild to apply the patch because it does not use epatch_user to apply patches in /etc/portage/patches.
This package is now orphan: http://my.opera.com/pacho/blog/2012/11/27/about-maintainer-needed
Fixed in hibernate-script-2.0-r6