mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
tests: Use gpgconf to stop the agent.
* tests/openpgp/defs.scm (stop-agent): Swap order of actions. Kill all daemons using gpgconf. * tools/gpgconf.c (main) <aRemoveSocketDir>: Try to remove known socketfails on rmdir failure. Do no fail for ENONET. -- Killing all daemons is not really required but it does not harm to be prepared for the future. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
178b6314ab
commit
2c9d9ac55e
2 changed files with 43 additions and 5 deletions
|
@ -453,10 +453,12 @@
|
|||
"|--debug-quick-random")
|
||||
/bye)))
|
||||
|
||||
;; Stop the agent and remove the socket dir.
|
||||
;; Stop the agent and other daemons and remove the socket dir.
|
||||
(define (stop-agent)
|
||||
(log "Stopping gpg-agent...")
|
||||
(call-check `(,(tool 'gpgconf) --kill all))
|
||||
(catch (log "Warning: Removing socket directory failed.")
|
||||
(call-popen `(,(tool 'gpgconf) --remove-socketdir) ""))
|
||||
(call-check `(,(tool 'gpg-connect-agent) --verbose --no-autostart
|
||||
killagent /bye)))
|
||||
(call-popen `(,(tool 'gpgconf) --remove-socketdir) "")))
|
||||
|
||||
|
||||
;; end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue