Adds an exit function to exit clojure process

Description

There is no standard function to exit the clojure process.
In java implementation,we use (System/exit 0),but in other implementations(CLR), i have to use another function.

Why not add a standard function in clojure.core?
For example:

(defn exit
([] (exit 0)
([status] (System/exit status)))

I think it's useful for us.

Environment

None

Attachments

1
  • 19 Jul 2022, 07:04 PM

Activity

Show:

Esteban FranqueiroJuly 19, 2022 at 7:04 PM

This patch (CLJ-986.0.patch) adds an exit function, as described above.

Tested like

[eaf@asuka clojure (CLJ-986)]$ ./run Clojure 1.12.0-master-SNAPSHOT user=> (exit) [eaf@asuka clojure (CLJ-986)]$

Details

Assignee

Reporter

Patch

Code

Priority

Created May 7, 2012 at 3:25 AM
Updated July 19, 2022 at 7:04 PM