mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
agent,gpg,tools: Fix use of log_get_fd.
* agent/call-daemon.c (daemon_start): Don't put file descriptor from log_get_fd to no_close_list. * agent/call-pinentry.c (start_pinentry): Likewise. * common/call-gpg.c (start_gpg): Likewise. * call-syshelp.c (start_syshelp): Likewise. * tools/gpg-connect-agent.c (main): Likewise. -- GnuPG-bug-id: 5921 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
52f9e13c0c
commit
fe535cf265
@ -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
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user