MSYS2-pacman
MSYS2-pacman copied to clipboard
persisting gpg-agent keeps cmd batch windows open
Please excuse if the location for this issue is wrong; but it seemed to be the most specific project's tracker to me.
When pacman-key is used in a Windows batch, a process of pgp-agent spawns. According to IRC #gnupg, this is automatic and can't be disabled in a gpg.conf anymore in GnuPG v2.
As long as this process is alive, the cmd window running the batch file (specifically, MABS) will not close when the batch finishes.
I tried to kill this agent at the end of the batch, using the following command:
gpg-connect-agent -q killagent /bye
This prints as result:
OK connection closed
but the process 'gpg-agent.exe' persists. Current workaround:
taskkill /IM gpg-agent.exe /f
at the end of the batch.
May this be an MSYS2 or more generally GnuPG Windows build specific issue in a way that gpg-connect-agent tries to kill the gpg-agent process with a method that doesn't work reliably in Windows?
This affects us on Travis CI, and seems to have changed very recently: https://github.com/XboxDev/nxdk/pull/218
Does anybody know when / where / why this changed?
Can we remove the taskkill
altogether?