diff --git a/agent/call-daemon.c b/agent/call-daemon.c index f907f40eb..0c3605274 100644 --- a/agent/call-daemon.c +++ b/agent/call-daemon.c @@ -414,11 +414,7 @@ daemon_start (enum daemon_type type, ctrl_t ctrl) i=0; if (!opt.running_detached) - { - if (log_get_fd () != -1) - no_close_list[i++] = assuan_fd_from_posix_fd (log_get_fd ()); - no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr)); - } + no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr)); no_close_list[i] = ASSUAN_INVALID_FD; /* Connect to the daemon and perform initial handshaking. Use diff --git a/agent/call-pinentry.c b/agent/call-pinentry.c index bb55a3714..711758efc 100644 --- a/agent/call-pinentry.c +++ b/agent/call-pinentry.c @@ -394,11 +394,7 @@ start_pinentry (ctrl_t ctrl) i=0; if (!opt.running_detached) - { - if (log_get_fd () != -1) - no_close_list[i++] = assuan_fd_from_posix_fd (log_get_fd ()); - no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr)); - } + no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr)); no_close_list[i] = ASSUAN_INVALID_FD; rc = assuan_new (&ctx); diff --git a/common/call-gpg.c b/common/call-gpg.c index c1472e961..a4723ca43 100644 --- a/common/call-gpg.c +++ b/common/call-gpg.c @@ -106,8 +106,6 @@ start_gpg (ctrl_t ctrl, const char *gpg_program, strlist_t gpg_arguments, argv[i++] = NULL; i = 0; - if (log_get_fd () != -1) - no_close_list[i++] = assuan_fd_from_posix_fd (log_get_fd ()); no_close_list[i++] = assuan_fd_from_posix_fd (fileno (stderr)); if (input_fd != -1) no_close_list[i++] = assuan_fd_from_posix_fd (input_fd); diff --git a/g13/call-syshelp.c b/g13/call-syshelp.c index a69573bd1..8850c3779 100644 --- a/g13/call-syshelp.c +++ b/g13/call-syshelp.c @@ -102,11 +102,8 @@ start_syshelp (ctrl_t ctrl, assuan_context_t *r_ctx) return err; } - i = 0; - if (log_get_fd () != -1) - no_close_list[i++] = assuan_fd_from_posix_fd (log_get_fd ()); - no_close_list[i++] = assuan_fd_from_posix_fd (es_fileno (es_stderr)); - no_close_list[i] = ASSUAN_INVALID_FD; + no_close_list[0] = assuan_fd_from_posix_fd (es_fileno (es_stderr)); + no_close_list[1] = ASSUAN_INVALID_FD; err = assuan_new (&ctx); if (err) diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c index dff367050..7a0dc65b9 100644 --- a/tools/gpg-connect-agent.c +++ b/tools/gpg-connect-agent.c @@ -1319,8 +1319,7 @@ main (int argc, char **argv) assuan_fd_t no_close[3]; no_close[0] = assuan_fd_from_posix_fd (es_fileno (es_stderr)); - no_close[1] = assuan_fd_from_posix_fd (log_get_fd ()); - no_close[2] = ASSUAN_INVALID_FD; + no_close[1] = ASSUAN_INVALID_FD; rc = assuan_new (&ctx); if (rc)