When no gpg-agent is running, gpg2 fails silently to sign a file. GPGME does
not report an error, and so doesn't GPA.
I guess GPGME could look at SIG_CREATED, but frankly I would appreciate it very
much if I could get one final result code per operation no matter what else
happens. This should be relatively easy to implement in gpg and is better than
ad-hoc rules that vary per operation.
$ gpg2 --status-fd 2 --sign ChangeLog
[GNUPG:] BEGIN_SIGNING H2
gpg: signing failed: Unknown IPC command
gpg: signing failed: Unknown IPC command