Skip to content
Snippets Groups Projects
Commit a5e5a6b0 authored by dtc's avatar dtc
Browse files

Cache the result of software-version in *software-version*.

parent 40c67dfc
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bsd-os.lisp,v 1.2 1998/03/03 12:20:32 pw Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/bsd-os.lisp,v 1.3 1998/03/10 18:28:43 dtc Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -25,11 +25,18 @@
(setq *software-type* #+FreeBSD "FreeBSD" #-FreeBSD "BSD")
(defvar *software-version* nil "Version string for supporting software")
(defun software-version ()
"Returns a string describing version of the supporting software."
(string-trim '(#\newline)
(with-output-to-string (stream)
(run-program "/usr/bin/uname" '("-r") :output stream))))
(unless *software-version*
(setf *software-version*
(string-trim '(#\newline)
(with-output-to-string (stream)
(run-program "/usr/bin/uname"
'("-r")
:output stream)))))
*software-version*)
;;; OS-Init initializes our operating-system interface. It sets the values
......@@ -37,8 +44,7 @@
;;; that set up the argument blocks for the server interfaces.
(defun os-init ()
nil)
(setf *software-version* nil))
;;; GET-SYSTEM-INFO -- Interface
;;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment