#+clisp (:import-from #:ext #:exit))
(defpackage #:mdw.sys-base
(:use #:common-lisp #:runlisp)
(:export #:exit #:hard-exit #:*program-name* #:*command-line*
#+clisp (:import-from #:ext #:exit))
(defpackage #:mdw.sys-base
(:use #:common-lisp #:runlisp)
(:export #:exit #:hard-exit #:*program-name* #:*command-line*
#+cmu ext:*command-line-strings*
#+sbcl sb-ext:*posix-argv*
#+ecl (loop from i below (ext:argc) collect (ext:argv i))
#+cmu ext:*command-line-strings*
#+sbcl sb-ext:*posix-argv*
#+ecl (loop from i below (ext:argc) collect (ext:argv i))
(defun exit (&optional (code 0))
"Polite way to end a program."
#+(or cmu ecl) (ext:quit code)
(defun exit (&optional (code 0))
"Polite way to end a program."
#+(or cmu ecl) (ext:quit code)
after fork, for example, to avoid flushing buffers."
(declare (type (unsigned-byte 32) code))
#+cmu (unix::void-syscall ("_exit" c-call:int) code)
after fork, for example, to avoid flushing buffers."
(declare (type (unsigned-byte 32) code))
#+cmu (unix::void-syscall ("_exit" c-call:int) code)
#+(or clisp ecl) (ext:quit code))
;;;----- That's all, folks --------------------------------------------------
#+(or clisp ecl) (ext:quit code))
;;;----- That's all, folks --------------------------------------------------