X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Fbsd-os.lisp;h=8e30939c61a042a6b2255dd616429470e40460d3;hb=4cf50b1896b25f5337e7c258b0b560da00d47993;hp=e36b615c8794510ab88b59fd1aff49b14b6b107e;hpb=a530bbe337109d898d5b4a001fc8f1afa3b5dc39;p=sbcl.git diff --git a/src/code/bsd-os.lisp b/src/code/bsd-os.lisp index e36b615..8e30939 100644 --- a/src/code/bsd-os.lisp +++ b/src/code/bsd-os.lisp @@ -4,9 +4,6 @@ ;;;; Carnegie Mellon University, and has been placed in the public ;;;; domain. -(sb!int:file-comment - "$Header$") - (in-package "SB!SYS") ;;;; Check that target machine features are set up consistently with @@ -21,19 +18,18 @@ #!+FreeBSD "FreeBSD" #!+OpenBSD "OpenBSD")) +(defvar *software-version* nil) + (defun software-version () #!+sb-doc "Return a string describing version of the supporting software, or NIL if not available." - #+nil ; won't work until we support RUN-PROGRAM.. - (unless *software-version* - (setf *software-version* - (string-trim '(#\newline) - (with-output-to-string (stream) - (run-program "/usr/bin/uname" - '("-r") - :output stream))))) - nil) + (or *software-version* + (setf *software-version* + (string-trim '(#\newline) + (with-output-to-string (stream) + (sb!ext:run-program "/usr/bin/uname" `("-r") + :output stream)))))) ;;; OS-COLD-INIT-OR-REINIT initializes our operating-system interface. ;;; It sets the values of the global port variables to what they @@ -49,8 +45,7 @@ (sb!unix:unix-getrusage sb!unix:rusage_self) (declare (ignore maxrss ixrss idrss isrss minflt)) (unless err? - (error "Unix system call getrusage failed: ~A." - (sb!unix:get-unix-error-msg utime))) + (simple-perror "Unix system call getrusage failed" :errno utime)) (values utime stime majflt)))