-(defvar *unix-signals* nil
- #!+sb-doc
- "A list of Unix signal structures.")
-
-(defmacro def-unix-signal (name number description)
- (let ((symbol (intern (symbol-name name))))
- `(progn
- ;; KLUDGE: This PUSH should be probably be something like PUSHNEW if we
- ;; want to be able to cleanly reload this file. (Or perhaps
- ;; *UNIX-SIGNALS* should be a hash table keyed by signal name, or a
- ;; vector keyed by signal number?)
- (push (make-unix-signal ,name ,number ,description) *unix-signals*)
- ;; This is to make the new signal lookup stuff compatible with
- ;; old code which expects the symbol with the same print name as
- ;; our keywords to be a constant with a value equal to the signal
- ;; number.
- (defconstant ,symbol ,number ,description))))
-
-(defun unix-signal-or-lose (arg)
- (let ((signal (find arg *unix-signals*
- :key (etypecase arg
- (symbol #'unix-signal-%name)
- (number #'unix-signal-%number)))))
- (unless signal
- (error "~S is not a valid signal name or number." arg))
- signal))
-
-(defun unix-signal-name (signal)
- #!+sb-doc
- "Return the name of the signal as a string. Signal should be a valid
- signal number or a keyword of the standard UNIX signal name."
- (symbol-name (unix-signal-%name (unix-signal-or-lose signal))))