Hi!
I am trying to write a little shell script to invoke the compiler
of CMUCL. This is lispc:
#!/bin/sh
exec -a lispc lisp -eval '(load "/home/cartan/bin/lispc.lisp" :verbose nil)'\
-noinit ··@"
and this is lispc.lisp:
(in-package "USER")
(defparameter exit-code 1)
(defun do-compile (args)
(let ((fname (car args)))
(if fname
(multiple-value-bind (truename warnings-p failure-p)
(ignore-errors (compile-file fname))
(cond ((null truename) (princ warnings-p))
(failure-p (princ "Failure!"))
(t (setf exit-code 0))))
(princ "No input file specified"))))
(do ((argv *command-line-strings* (cdr argv)))
((string-equal (car argv) "-noinit") (do-compile (cdr argv))))
(terpri)
(force-output)
(unix:unix-exit exit-code)
The problem is, when there is a read error while compiling the
file, the debugger is entered, despite the `ignore-errors' form.
Also, when I press `Ctrl-c' during compilation, the appropriate
signal handler is entered and I am in the debugger again. Is
there some way to completely disable the debugger? Or something
like `ignore-really-all-errors-and-I-mean-all' ?
--
Nils Goesche
Ask not for whom the <CONTROL-G> tolls.
Nils Goesche <······@t-online.de> writes:
> Is there some way to completely disable the debugger? Or
> something like `ignore-really-all-errors-and-I-mean-all' ?
Never mind. This does it:
(setf *debugger-hook* (lambda (cnd hook)
(declare (ignore cnd hook))
; (princ cnd)
(force-output)
(unix:unix-exit 2)))
(system:default-interrupt unix:SIGINT)
(system:default-interrupt unix:SIGQUIT)
(system:default-interrupt unix:SIGILL)
(system:default-interrupt unix:SIGBUS)
(system:default-interrupt unix:SIGSEGV)
(system:default-interrupt unix:SIGFPE)
--
Nils Goesche
Ask not for whom the <CONTROL-G> tolls.