Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
Update of /cvsroot/sbcl/sbcl/src/code
In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14734/src/code
126.96.36.199: hopefully fix _long_ SLEEP issues on OpenBSD
* OpenBSD refuses to nanosleep() over 100 million seconds (returning
EINVAL), so loop with 100 million second sleeps till the time left
is smaller than that.
...who knows, maybe there is a good reason to sleep over 3 years?
Bug reported by Johsh Elsasser.
RCS file: /cvsroot/sbcl/sbcl/src/code/toplevel.lisp,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -d -r1.107 -r1.108
--- toplevel.lisp 25 Jun 2009 10:32:56 -0000 1.107
+++ toplevel.lisp 31 Jul 2009 09:42:20 -0000 1.108
@@ -174,9 +174,13 @@
(multiple-value-bind (sec frac)
(values sec (truncate frac 1e-9))))
- ;; nanosleep accepts time_t as the first argument,
- ;; so truncating is needed. 68 years on 32-bit platform should be enough
- (sb!unix:nanosleep (min sec (1- (ash 1 (1- sb!vm:n-word-bits)))) nsec))
+ ;; nanosleep() accepts time_t as the first argument, but on some platforms
+ ;; it is restricted to 100 million seconds. Maybe someone can actually
+ ;; have a reason to sleep for over 3 years?
+ (loop while (> sec (expt 10 8))
+ do (decf sec (expt 10 8))
+ (sb!unix:nanosleep (expt 10 8) 0))
+ (sb!unix:nanosleep sec nsec))
(sb!win32:millisleep (truncate (* seconds 1000)))