[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix needed for communication with gpg-agent
From: |
Werner Koch |
Subject: |
Re: Fix needed for communication with gpg-agent |
Date: |
Thu, 22 Feb 2007 09:13:49 +0100 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) |
On Thu, 22 Feb 2007 00:15, address@hidden said:
> Since this was the main problem which we were concerned with, the
> problem is reduced to find a way to block Emacs from reading from the
> tty while pinentry needs it.
So the problem is that pinentry does not have exclusive access to the
tty. What we do is:
/* Open the desired terminal if necessary. */
if (tty_name)
{
ttyfi = fopen (tty_name, "r");
if (!ttyfi)
return -1;
ttyfo = fopen (tty_name, "w");
if (!ttyfo)
{
int err = errno;
fclose (ttyfi);
errno = err;
return -1;
}
screen = newterm (tty_type, ttyfo, ttyfi);
set_term (screen);
}
else
{
if (!init_screen)
{
init_screen = 1;
initscr ();
}
else
clear ();
}
keypad (stdscr, TRUE); /* Enable keyboard mapping. */
nonl (); /* Tell curses not to do NL->CR/NL on output. */
cbreak (); /* Take input chars one at a time, no wait for \n. */
noecho (); /* Don't echo input - in color. */
TTY_NAME is taken from the envvar GPG_TTY. Just an idea: What about
having emacs allocating a new pty pass that to gpg/gpg-agent. Emacs
could then monitor the pty and thus notice if pinentry is going to use
it.
Salam-Shalom,
Werner
- Fix needed for communication with gpg-agent, Richard Stallman, 2007/02/17
- Re: Fix needed for communication with gpg-agent, Chong Yidong, 2007/02/18
- Re: Fix needed for communication with gpg-agent, Richard Stallman, 2007/02/19
- Re: Fix needed for communication with gpg-agent, Sascha Wilde, 2007/02/21
- Re: Fix needed for communication with gpg-agent, Kim F. Storm, 2007/02/21
- Re: Fix needed for communication with gpg-agent, Chong Yidong, 2007/02/21
- Re: Fix needed for communication with gpg-agent, Kim F. Storm, 2007/02/22
- Re: Fix needed for communication with gpg-agent, Werner Koch, 2007/02/23
- Re: Fix needed for communication with gpg-agent,
Werner Koch <=
- Re: Fix needed for communication with gpg-agent, Richard Stallman, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Werner Koch, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Chong Yidong, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Richard Stallman, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Richard Stallman, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Chong Yidong, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Kim F. Storm, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Chong Yidong, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Kim F. Storm, 2007/02/23
- Re: Fix needed for communication with gpg-agent, Sascha Wilde, 2007/02/24