X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftoplevel.lisp;h=f5190028b4490a9d3fa4b4e56601f1460377dc1d;hb=d3af5593ffff1c39a2f8fa8113704803f347e22f;hp=66b0b3fa0472f07912dd77996131dbebe3b27225;hpb=237ec432952f0e7d4a4bcd5f683942a253cac56a;p=sbcl.git diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index 66b0b3f..f519002 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -174,9 +174,13 @@ any non-negative real number." (multiple-value-bind (sec frac) (truncate seconds) (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)) #!+win32 (sb!win32:millisleep (truncate (* seconds 1000))) nil) @@ -293,7 +297,10 @@ any non-negative real number." (handling-end-of-the-world (with-open-file (f pathname :element-type :default) (sb!fasl::maybe-skip-shebang-line f) - (load f :verbose nil :print nil) + ;; Scripts don't need to be stylish or fast, but silence is usually a + ;; desirable quality... + (handler-bind (((or style-warning compiler-note) #'muffle-warning)) + (load f :verbose nil :print nil)) (quit))))) ;; Errors while processing the command line cause the system to QUIT,