Subject: Re: bug#7789: cannot send smtpmail using gmail & tls on woe32

From: [email-masked] (Claudio Bley)
Date: Mon, 17 Jan 2011 09:09:10 +0100

Hi.

At Thu, 6 Jan 2011 18:13:40 -0500,
Sam Steingold wrote:
> I am still having this problem (native bzr tip emacs; both cygwin &
> mingw gnutls-cli).
> any suggestions are welcome.

The problem is that Woe32 does not support signals. So, Emacs "Only
handle(s) signals that will result in the process dying" (see
src/w32proc.c:1427 sys_kill).

gnutls-cli waits for a SIGALRM to initiate the STARTTLS handshake --
which Emacs isn't able to send -- or, alternatively, an EOF -- which
doesn't work because communication is done over a pipe instead of a
PTY.

I'm using cygwin's gnutls-cli and have hacked ssl.el in order to
replace the signal-process calls with (call-process "kill.exe" nil nil
nil "-ALRM" PID). This works because cygwin provides its own layer of
signal handling and is able to send / receive the SIGALRM signal.

Make sure to call cygwin's kill.exe, not the one from MinGW.

It would be nice if one would be able to use starttls natively under
Woe32 by using some other means instead of signals to communicate with
it, e.g. just using windows messages (WM_COPYDATA)?

- Claudio