[Git][cmucl/cmucl][master] 2 commits: Fix #128: quit accepts an exit code

Raymond Toy (@rtoy) gitlab at common-lisp.net
Sun Aug 14 15:00:54 UTC 2022



Raymond Toy pushed to branch master at cmucl / cmucl


Commits:
9cf3916e by Raymond Toy at 2022-08-14T15:00:30+00:00
Fix #128: quit accepts an exit code

- - - - -
3aec3f5e by Raymond Toy at 2022-08-14T15:00:31+00:00
Merge branch 'issue-128-quit-exit-code' into 'master'

Fix #128: quit accepts an exit code

Closes #128

See merge request cmucl/cmucl!87
- - - - -


3 changed files:

- src/code/lispinit.lisp
- src/general-info/release-21e.md
- src/i18n/locale/cmucl.pot


Changes:

=====================================
src/code/lispinit.lisp
=====================================
@@ -492,14 +492,15 @@
 
 ;;; Quit gets us out, one way or another.
 
-(defun quit (&optional recklessly-p)
-  "Terminates the current Lisp.  Things are cleaned up unless Recklessly-P is
-  non-Nil."
+(defun quit (&optional recklessly-p (code 0))
+  "Terminates the current Lisp.  Things are cleaned up unless
+  Recklessly-P is non-Nil.  On quitting, Lisp sets the return code to
+  Code, defaulting to 0."
   (if recklessly-p
-      (unix:unix-exit 0)
+      (unix:unix-exit code)
       (progn
         (mapc (lambda (fn) (ignore-errors (funcall fn))) *cleanup-functions*)
-        (throw '%end-of-the-world 0))))
+        (throw '%end-of-the-world code))))
 
 
 #-mp ; Multi-processing version defined in multi-proc.lisp.


=====================================
src/general-info/release-21e.md
=====================================
@@ -51,6 +51,7 @@ public domain.
     * ~~#121~~ Wrong column index in FILL-POINTER-OUTPUT-STREAM
     * ~~#122~~ gcc 11 can't build cmucl
     * ~~#127~~ Linux unix-getpwuid segfaults when given non-existent uid.
+    * ~~#128~~ `QUIT` accepts an exit code
   * Other changes:
   * Improvements to the PCL implementation of CLOS:
   * Changes to building procedure:


=====================================
src/i18n/locale/cmucl.pot
=====================================
@@ -309,8 +309,9 @@ msgstr ""
 
 #: src/code/lispinit.lisp
 msgid ""
-"Terminates the current Lisp.  Things are cleaned up unless Recklessly-P is\n"
-"  non-Nil."
+"Terminates the current Lisp.  Things are cleaned up unless\n"
+"  Recklessly-P is non-Nil.  On quitting, Lisp sets the return code to\n"
+"  Code, defaulting to 0."
 msgstr ""
 
 #: src/code/lispinit.lisp



View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/88ca0184f219100c92888cfe0750b163f998aff4...3aec3f5e749fc7a3b06ed5e03834b970002dedb8

-- 
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/-/compare/88ca0184f219100c92888cfe0750b163f998aff4...3aec3f5e749fc7a3b06ed5e03834b970002dedb8
You're receiving this email because of your account on gitlab.common-lisp.net.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20220814/43ec1da9/attachment-0001.html>


More information about the cmucl-cvs mailing list