How to escape from debugger loop if *STANDARD-INPUT* is redirected?
Josef Wolf <[email protected]> Fri, 14 Feb 2025 11:26:50 +0100
| Newsgroups | gmane.lisp.steel-bank.general |
|---|---|
| Message-ID | <[email protected]> |
Hello folks,
I ave written a clean/smudge filter for git. This works by redirecting
*STANDARD-INPUT* to a pipe into which git feeds the contents of the blob.
When I interrup such a (long-running) git operation, SCBL throws me into the
debugger. But there is no way to interact with the debugger from th terminal
since *STANDARD-INPUT* is redirected to a pipe (which is now dead, since git
died).
Every time I try to choose the "ABORT" option, my input is fed to the shell
and SBCL starts another level of debugger.
In this situation the only way to get out of this situation is to manually
search the appropriate SBCL process and kill it manually.
Any ideas?
Here's an example:
^Cbasing (39/206)
debugger invoked on a SB-SYS:INTERACTIVE-INTERRUPT @52D7374C in thread
#<THREAD tid=2843553 "main thread" RUNNING {1002140003}>:
Interactive interrupt at #x52D7374C.
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Return from SB-UNIX:SIGINT.
1: [ABORT ] Exit from the current thread.
(FIND #\" (#\ #\Newline #\Tab #\Return #\Newline #\Page)) [more]
1]
[email protected]:/m/s/rep/git/wolf/all/ets-utils/misc$ ^C
[email protected]:/m/s/rep/git/wolf/all/ets-utils/misc$ ^C
[email protected]:/m/s/rep/git/wolf/all/ets-utils/misc$ ^C
[email protected]:/m/s/rep/git/wolf/all/ets-utils/misc$ 1
debugger invoked on a SB-INT:SIMPLE-STREAM-ERROR @52D7374C in thread
#<THREAD tid=2843553 "main thread" RUNNING {1002140003}>:
couldn't read from #<SB-SYS:FD-STREAM for "the terminal" {100213C4F3}>:
Input/output error
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT ] Reduce debugger level (to debug level 1).
1: Exit from the current thread.
2: [CONTINUE] Return from SB-UNIX:SIGINT.
(SB-IMPL::REFILL-INPUT-BUFFER #<SB-SYS:FD-STREAM for "the terminal"
{100213C4F3}>)
0[2] 0: Befehl nicht gefunden.
--
Josef Wolf
[email protected]