diff options
Diffstat (limited to 'sm/call-dirmngr.c')
-rw-r--r-- | sm/call-dirmngr.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c index 1cdf3e243..017191dbe 100644 --- a/sm/call-dirmngr.c +++ b/sm/call-dirmngr.c @@ -143,6 +143,8 @@ start_dirmngr (void) { const char *pgmname; const char *argv[3]; + int no_close_list[3]; + int i; if (opt.verbose) log_info (_("no running dirmngr - starting one\n")); @@ -164,8 +166,15 @@ start_dirmngr (void) argv[1] = "--server"; argv[2] = NULL; + i=0; + if (log_get_fd () != -1) + no_close_list[i++] = log_get_fd (); + no_close_list[i++] = fileno (stderr); + no_close_list[i] = -1; + /* connect to the agent and perform initial handshaking */ - rc = assuan_pipe_connect (&ctx, opt.dirmngr_program, (char**)argv, 0); + rc = assuan_pipe_connect (&ctx, opt.dirmngr_program, (char**)argv, + no_close_list); } else { |