If a dirmngr process has an existing connection open, it fails to terminate
properly.
It does print out:
dirmngr[28267.0]: SIGTERM received - shutting down ...
but then no termination happens.
You can replicate this from the source tree with two terminals. in terminal A:
TEST=$(mktemp -d -m 0700) ./dirmngr/dirmngr --daemon --homedir $TEST GNUPGHOME=$TEST ./tools/gpg-connect-agent --dirmngr 'getinfo pid' /bye
and in terminal B:
GNUPGHOME=$TEST ./tools/gpg-connect-agent --dirmngr
(leaving that connection open)
and then back in terminal A, sending a SIGTERM to the process ID:
kill $DIRMNGR_PID
subsequent attempts to connect from other terminals with:
GNUPGHOME=$TEST ./tools/gpg-connect-agent --dirmngr
will hang, and the only way for dirmngr to shut down is to send it another
SIGTERM when no outstanding connections are still made.