Ensure argument to EXIT is an integer.
This commit is contained in:
parent
5c19731d59
commit
c0b8928e7d
|
@ -1139,11 +1139,14 @@
|
|||
proc))
|
||||
|
||||
(define (exit . maybe-status)
|
||||
(call-exit-hooks-and-narrow
|
||||
(lambda ()
|
||||
(exit/errno (:optional maybe-status 0))
|
||||
(display "The evil undead walk the earth." 2)
|
||||
(if #t (error "(exit) returned.")))))
|
||||
(let ((status (:optional maybe-status 0)))
|
||||
(if (not (integer? status))
|
||||
(error "non-integer argument to exit"))
|
||||
(call-exit-hooks-and-narrow
|
||||
(lambda ()
|
||||
(exit/errno status)
|
||||
(display "The evil undead walk the earth." 2)
|
||||
(if #t (error "(exit) returned."))))))
|
||||
|
||||
|
||||
;;; The classic T 2.0 primitive.
|
||||
|
|
Loading…
Reference in New Issue