[Ecls-list] Signaling a more specific condition on signals.

Pascal J. Bourguignon pjb at informatimago.com
Fri Aug 20 20:23:23 UTC 2010


When a unix signal is received, ecl cl:signals a simple-error with:

unixint.d:370:                FEerror("Serious signal ~D caught.", 1, signal_code);

In this it would be better if a specific condition was signaled
instead, so that applications could more easily handle the signal.
For example:

(define-condition unix-signal-received ()
   ((signal-code :type fixnum
                 :initform 0
                 :initarg :signal-code
                 :accessor unix-signal-received-signal-code))
  (:report (lambda (condition stream)
             (format stream "Serious signal ~D caught."
                     (unix-signal-received-signal-code condition)))))


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/





More information about the ecl-devel mailing list