Re: interrupt signal in MSW

Gunter Königsmann <[email protected]> Tue, 8 May 2018 17:31:24 +0200
Newsgroups gmane.lisp.clisp.general
Message-ID <[email protected]>

On 07.05.2018 18:09, Gunter Königsmann wrote:
>>
>>> GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, pid)
>>> acts as Ctrl+Break were pressed, instead. This event immediately crashes clisp on Windows, currently.
>>> But that might not be a bug but a convenient way to enter an eventually-running debugger => In case that
>>> Ctrl+C doesn't work on Windows: Is there a way to make use of this event, instead?
>>
>> "crashes" or terminates? See
>> https://gitlab.com/gnu-clisp/clisp/blob/master/src/win32aux.d#L46
>> /* Ctrl-C-interruptibility.
>>  We treat Ctrl-C as under Unix: Enter a break loop, continuable if possible.
>>  We treat Ctrl-Break as usual under Windows: abort the application, as if
>>  (exit t) was called, with exit code 130.
>>

Here <CTRL+Break> causes a segment violation. No idea if it is a bug in
clisp, in wxMaxima or somewhere totally else. And no complaints at all
as I assume I don't want to use Ctrl-Break.

C:\maxima-current\bin>maxima -l clisp
Maxima branch_5_41_base_358_gc894ecb_dirty http://maxima.sourceforge.net
using Lisp CLISP 2.49 (2010-07-07)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1)


<Here I press ctrl+Break>
*** - handle_fault error2 ! address = 0x74541739 not in
[0x61a92af8,0x61cc0000)!
SIGSEGV cannot be cured. Fault address = 0x74541739.
GC count: 0
Space collected by GC: 0 0
Run time: 0 1092007
Real time: 0 128870957
GC time: 0 0
Permanently allocated: 92960 bytes.
Currently in use: 8566192 bytes.
Free space: 883233 bytes.


> 
> The lisp was invoked via a batch file that was invoked from the console
> (cmd.exe). With sbcl that worked fine. But perhaps that is the problem.
> 
> Will make new tests tomorrow.
> 

Seems like I need to call the batch file in a way that it is part of a
process group so I can send a signal to the process group.

Perhaps that enables me to send a Ctrl_C_EVENT to clisp. The question
then will be if clisp gets this signal (even if it shares the process
group with cmd.exe; sbcl somehow manages to get this signal) and if
there is lisp code necessary other than the code that catches SIGINT on
linux.

Kind regards,

    Gunter.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
clisp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/clisp-list