Helmut Eller wrote:
>The CLISP/Win32 returned -1.
clisp-2.33, or 2.33.1, or 2.33.2?
clisp from CVS must work.
I'll submit a patch to have the older versions work.
>I guess SIGINT is not the Windows way and something else should be
>used instead.
[Aside: I'd be happy if slime.el:slime-send-sigint actually used 'SIGINT. The source code just says '2 -- Emacs-20.7 says: "SIGCODE may be an integer, or a symbol whose name is a signal name." 'SIGINT would be self-documenting.]
I did the following experiment, using Emacs-20.7 on MS-Windows-2k
M-x shell
cd path\to\clisp
lisp.exe -M lispinit.mem
(ffi:def-call-out getpid (:name "GetCurrentProcessId") (:return-type ffi:uint) (:language :stdc-stdcall) (:library "kernel32.dll"))
;relative path "kernel32.dll" is reported not to work with cygwin
-> 1840
M-: (process-id(get-buffer-process(current-buffer)))
-> 1812
M-: (signal-process 1840 'SIGINT)
;-> -1 and clisp is not interrupted(!)
M-: (signal-process 1812 'SIGINT)
;-> 0 and Emacs titlebar flashes and clisp gets interrupt
I.e., in this scenario, the internal pid is useless!
Now, using C-u M-x run-lisp, which starts lisp.exe directly instead of going through the cmd.exe proxy, both process ids match, and clisp becomes interruptible by Emacs. SLIME starts clisp the same way (at least in my setup).
I have yet to check when clisp is started via clisp.exe which in turn starts lisp.exe.
Alas, I know of no other way for signaling an interrupt under Emacs.
Regards,
Jorg Hohle.