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:
parent
72e04b03b1
commit
a084924d07
@ -2718,7 +2718,7 @@ cmd_killdirmngr (assuan_context_t ctx, char *line)
|
|||||||
|
|
||||||
ctrl->server_local->stopme = 1;
|
ctrl->server_local->stopme = 1;
|
||||||
assuan_set_flag (ctx, ASSUAN_FORCE_CLOSE, 1);
|
assuan_set_flag (ctx, ASSUAN_FORCE_CLOSE, 1);
|
||||||
return gpg_error (GPG_ERR_EOF);
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1182,6 +1182,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
assuan_set_gpg_err_source (0);
|
assuan_set_gpg_err_source (0);
|
||||||
|
|
||||||
|
gnupg_init_signals (0, NULL);
|
||||||
|
|
||||||
opt.autostart = 1;
|
opt.autostart = 1;
|
||||||
opt.connect_flags = 1;
|
opt.connect_flags = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user