1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

gpg-connect-agent: Catch signals so that SIGPIPE is ignored.

* dirmngr/server.c (cmd_killdirmngr): Return 0.
* tools/gpg-connect-agent.c (main): Catch signals.
--

And we also print nicer diagnostics.  The reason we need this is that
for example "gpgconf --kill dirmngr" uses gpg-connect-agent to send a
command to dirmngr.  This may results in a SIGPIPE which in turn leads
to an annoying error message from gpgconf.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-09-10 10:49:54 +02:00
parent 72e04b03b1
commit a084924d07
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
2 changed files with 2 additions and 1 deletions

View File

@ -2718,7 +2718,7 @@ cmd_killdirmngr (assuan_context_t ctx, char *line)
ctrl->server_local->stopme = 1;
assuan_set_flag (ctx, ASSUAN_FORCE_CLOSE, 1);
return gpg_error (GPG_ERR_EOF);
return 0;
}

View File

@ -1182,6 +1182,7 @@ main (int argc, char **argv)
assuan_set_gpg_err_source (0);
gnupg_init_signals (0, NULL);
opt.autostart = 1;
opt.connect_flags = 1;