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

o Ignore the return value from a call to "times" which may overflow

  the 32 bit integer result. From Eric Marsden.
parent 61e7667f
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/unix.lisp,v 1.67 2000/08/25 09:59:05 pw Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/unix.lisp,v 1.68 2001/01/23 12:24:02 dtc Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -1935,13 +1935,13 @@
"Unix-times returns information about the cpu time usage of the process
and its children."
(with-alien ((usage (struct tms)))
(syscall* ("times" (* (struct tms)))
(values t
(slot usage 'tms-utime)
(slot usage 'tms-stime)
(slot usage 'tms-cutime)
(slot usage 'tms-cstime))
(addr usage))))
(alien-funcall (extern-alien "times" (function int (* (struct tms))))
(addr usage))
(values t
(slot usage 'tms-utime)
(slot usage 'tms-stime)
(slot usage 'tms-cutime)
(slot usage 'tms-cstime))))
) ; end progn
;; Requires call to tzset() in main.
......
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