how to improve tools that test for $GPG_AGENT_INFO

Daniel Kahn Gillmor dkg at
Fri Mar 20 16:35:46 CET 2015

On Thu 2015-03-19 07:18:20 -0400, Werner Koch wrote:
> On Wed, 18 Mar 2015 20:11, dgouttegattat at said:
>> Another possibility (which still requires to spawn a new process)
> I don't think that there is a way to avoid this.
>> If "gpg-agent --use-standard-socket-p" returns 0, then you know you
>> can use the agent even if there is no GPG_AGENT_INFO in the
> (That is what gpg uses internally to check whether gpg-agent has been
>  configured to use a standard socket and works for 2.0 and 2.1.)
> I think that is the best option.

Thanks, this is useful guidance.

I note that --use-standard-socket-p isn't mentioned in the gpg-agent(1)
man page.  Could it be added?  I suspect tools that rely on gpg will be
more comfortable relying on a documented stable interface than just a
mailing list post.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 948 bytes
Desc: not available
URL: </pipermail/attachments/20150320/402f8fa6/attachment.sig>

More information about the Gnupg-devel mailing list