emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: smtpmail on Windows native Emacs with gnutls-cli from Cygwin freeze.


From: Eli Zaretskii
Subject: Re: smtpmail on Windows native Emacs with gnutls-cli from Cygwin freeze.
Date: Mon, 24 Oct 2011 02:57:45 -0400

> From: Lars Magne Ingebrigtsen <address@hidden>
> Date: Mon, 24 Oct 2011 01:56:34 +0200
> MailScanner-NULL-Check: address@hidden
> Cc: address@hidden
> 
> Oleksandr Gavenko <address@hidden> writes:
> 
> 
> [...]
> 
> >       (signal-process (process-id process) 'SIGALRM)
> 
> [...]
> 
> > and 'signal-process' call do nothing for SIGALRM. More correctly
> > return error. Look to 'src/w32proc.c':
> >
> >   int
> >   sys_kill (int pid, int sig)
> >   {
> >     ...
> >     /* Only handle signals that will result in the process dying */
> >     if (sig != SIGINT && sig != SIGKILL && sig != SIGQUIT && sig != SIGHUP)
> >       {
> >         errno = EINVAL;
> >         return -1;
> >       }
> 
> Isn't that the bug, though?  Why isn't `signal-process' sending the
> signal we request on Windows?

Because you cannot send a signal to another process on MS-Windows.

Look at the rest of the code in sys_kill, below the above test, and
you will see that it emulates sending the 4 signals mentioned above,
by either (a) sending the equivalent of Ctrl-C to the window of the
sub-process, or (b) by forcefully terminating that process.

Emulating SIGALRM in a similar way is extremely tricky, because it
would involve reading the other process's memory to find out where its
SIGALRM handler is, if any (very non-trivial), and either terminating
it if no handler is found (easy) or calling that handler (hard).
Patches to do that are welcome.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]