Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
-
9cf3916e
by Raymond Toy at 2022-08-14T15:00:30+00:00
-
3aec3f5e
by Raymond Toy at 2022-08-14T15:00:31+00:00
3 changed files:
Changes:
... | ... | @@ -492,14 +492,15 @@ |
492 | 492 | |
493 | 493 | ;;; Quit gets us out, one way or another.
|
494 | 494 | |
495 | -(defun quit (&optional recklessly-p)
|
|
496 | - "Terminates the current Lisp. Things are cleaned up unless Recklessly-P is
|
|
497 | - non-Nil."
|
|
495 | +(defun quit (&optional recklessly-p (code 0))
|
|
496 | + "Terminates the current Lisp. Things are cleaned up unless
|
|
497 | + Recklessly-P is non-Nil. On quitting, Lisp sets the return code to
|
|
498 | + Code, defaulting to 0."
|
|
498 | 499 | (if recklessly-p
|
499 | - (unix:unix-exit 0)
|
|
500 | + (unix:unix-exit code)
|
|
500 | 501 | (progn
|
501 | 502 | (mapc (lambda (fn) (ignore-errors (funcall fn))) *cleanup-functions*)
|
502 | - (throw '%end-of-the-world 0))))
|
|
503 | + (throw '%end-of-the-world code))))
|
|
503 | 504 | |
504 | 505 | |
505 | 506 | #-mp ; Multi-processing version defined in multi-proc.lisp.
|
... | ... | @@ -51,6 +51,7 @@ public domain. |
51 | 51 | * ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
|
52 | 52 | * ~~#122~~ gcc 11 can't build cmucl
|
53 | 53 | * ~~#127~~ Linux unix-getpwuid segfaults when given non-existent uid.
|
54 | + * ~~#128~~ `QUIT` accepts an exit code
|
|
54 | 55 | * Other changes:
|
55 | 56 | * Improvements to the PCL implementation of CLOS:
|
56 | 57 | * Changes to building procedure:
|
... | ... | @@ -309,8 +309,9 @@ msgstr "" |
309 | 309 | |
310 | 310 | #: src/code/lispinit.lisp
|
311 | 311 | msgid ""
|
312 | -"Terminates the current Lisp. Things are cleaned up unless Recklessly-P is\n"
|
|
313 | -" non-Nil."
|
|
312 | +"Terminates the current Lisp. Things are cleaned up unless\n"
|
|
313 | +" Recklessly-P is non-Nil. On quitting, Lisp sets the return code to\n"
|
|
314 | +" Code, defaulting to 0."
|
|
314 | 315 | msgstr ""
|
315 | 316 | |
316 | 317 | #: src/code/lispinit.lisp
|