Ensure argument to EXIT is an integer.

This commit is contained in:
mainzelm 2003-04-22 15:56:20 +00:00
parent 5c19731d59
commit c0b8928e7d
1 changed files with 8 additions and 5 deletions

View File

@ -1139,11 +1139,14 @@
proc)) proc))
(define (exit . maybe-status) (define (exit . maybe-status)
(call-exit-hooks-and-narrow (let ((status (:optional maybe-status 0)))
(lambda () (if (not (integer? status))
(exit/errno (:optional maybe-status 0)) (error "non-integer argument to exit"))
(display "The evil undead walk the earth." 2) (call-exit-hooks-and-narrow
(if #t (error "(exit) returned."))))) (lambda ()
(exit/errno status)
(display "The evil undead walk the earth." 2)
(if #t (error "(exit) returned."))))))
;;; The classic T 2.0 primitive. ;;; The classic T 2.0 primitive.