From 1cb653cbdf12a2b005262f6e2c268ef73425c4dd Mon Sep 17 00:00:00 2001 From: Ben Kibbey Date: Sun, 24 Feb 2013 15:18:03 -0500 Subject: [PATCH] Keep the GPG_AGENT_INFO environment variable on failure. Only reset if the "agent_env_file" configuration parameter exists. Fixes gpg-agent command failure of GPG_ERR_EPIPE. The command will retry connecting to the existing GPG_AGENT_INFO socket. --- src/agent.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/agent.c b/src/agent.c index dfed1fa2..3c9a7c03 100644 --- a/src/agent.c +++ b/src/agent.c @@ -235,7 +235,6 @@ send_to_agent (struct agent_s * agent, char **result, size_t * len, && (gpg_err_code (rc) == GPG_ERR_ASS_CONNECT_FAILED || gpg_err_code (rc) == GPG_ERR_EPIPE)) { - unsetenv ("GPG_AGENT_INFO"); agent->restart = 1; rc = launch_agent (agent); if (!rc) -- 2.11.4.GIT