[Gpg4win-devel] Controlling gpg-agent under MS Windows 7

Werner Koch wk at gnupg.org
Mon Mar 24 16:42:11 CET 2014


On Mon, 24 Mar 2014 16:00, pvoigt at uos.de said:

> gpg-connect-agent killagent /bye
>
> fails with following error message:
> "gpg-connect-agent: can't connect to the agent: IPC "connect" Aufruf
> fehlgeschlagen"

We are using it in the installer:

    ifFileExists "$INSTDIR\gpg-connect-agent.exe"  0 no_gpg_connect_agent
      ExecWait '"$INSTDIR\gpg-connect-agent.exe" killagent /bye'
    no_gpg_connect_agent:

and the uninstaller:

  # Try to stop a running agent.  This is only for the admin but in
  # some cases that is actually useful.
  ifFileExists "$INSTDIR\gpg-connect-agent.exe" 0 no_u_gpg_connect_agent
    ifFileExists "$INSTDIR\libgpg-error-0.dll" 0 no_u_gpg_connect_agent
      ifFileExists "$INSTDIR\libw32pth-0.dll" 0 no_u_gpg_connect_agent
        ExecWait '"$INSTDIR\gpg-connect-agent.exe" killagent /bye'
  no_u_gpg_connect_agent:

> Is the above command supposed to run under Linux with GnuPG 2.0.22?

Yes:

  static gpg_error_t
  cmd_killagent (assuan_context_t ctx, char *line)
  {
    ctrl_t ctrl = assuan_get_pointer (ctx);
  
    (void)line;
  
    if (!opt.use_standard_socket)
      return set_error (GPG_ERR_NOT_SUPPORTED, "no --use-standard-socket");
  
    ctrl->server_local->stopme = 1;
    return gpg_error (GPG_ERR_EOF);
  }
  
As you see you need to have used --use-standard-socket.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.



More information about the Gpg4win-devel mailing list