Changeset 14288 for trunk/source/level-1


Ignore:
Timestamp:
Sep 20, 2010, 2:57:25 AM (9 years ago)
Author:
gb
Message:

l1-boot-2.lisp:
In INITIALIZE-INTERACTIVE-STREAMS: ensure that *STDOUT*, *STDERR*, and

(if it's disjoint) *TERMINAL-OUTPUT* are auto-flushed.

linux-files.lisp:
#+windows-target Define GET-LAST-WINDOWS-ERROR, so that #_GetLastError
can be called from code that may have to run before the FFI is
initialized.
When prompting the user to type :Y, force output. (This may run on the
housekeeping thread, so that output may not get autoflushed.)

l0-cfm-support.lisp: if GET-SHARED-LIBRARY fails, signal the error on
the calling thread (even if the #_dlopen/whatever happens on the initial
thread); fixes ticket:742

Location:
trunk/source/level-1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-boot-2.lisp

    r14171 r14288  
    118118                                   #+windows-target (%ptr-to-int
    119119                                                     (#_GetStdHandle #$STD_ERROR_HANDLE))
    120                     :basic t :direction :output :sharing :lock :encoding encoding-name #+windows-target :line-termination #+windows-target :crlf))
     120                                   :basic t :direction :output :sharing :lock :encoding encoding-name #+windows-target :line-termination #+windows-target :crlf))
     121    (add-auto-flush-stream *stdout*)
     122    (add-auto-flush-stream *stderr*)
    121123    (if *batch-flag*
    122124      (let* ((tty-fd
    123                #-windows-target
     125              #-windows-target
    124126               (let* ((fd (fd-open "/dev/tty" #$O_RDWR)))
    125127                 (if (>= fd 0) fd)))
    126128             (can-use-tty #-windows-target (and tty-fd (eql (tcgetpgrp tty-fd) (getpid)))))
    127129        (if can-use-tty
    128           (setq
    129            *terminal-input* (make-fd-stream tty-fd
    130                                             :basic t
    131                                             :direction :input
    132                                             :interactive t
    133                                             :sharing :lock
    134                                             :encoding encoding-name)
    135            *terminal-output* (make-fd-stream tty-fd :basic t :direction :output :sharing :lock :encoding encoding-name)
    136            *terminal-io* (make-echoing-two-way-stream
    137                           *terminal-input* *terminal-output*))
     130          (progn
     131            (setq
     132             *terminal-input* (make-fd-stream tty-fd
     133                                              :basic t
     134                                              :direction :input
     135                                              :interactive t
     136                                              :sharing :lock
     137                                              :encoding encoding-name)
     138             *terminal-output* (make-fd-stream tty-fd :basic t :direction :output :sharing :lock :encoding encoding-name)
     139             *terminal-io* (make-echoing-two-way-stream
     140                            *terminal-input* *terminal-output*))
     141            (add-auto-flush-stream *terminal-output*))
    138142          (progn
    139143            (when tty-fd (fd-close tty-fd))
  • trunk/source/level-1/linux-files.lisp

    r14258 r14288  
    890890
    891891#+windows-target
    892 (defun %windows-error-string (error-number) 
     892(progn
     893(defun get-last-windows-error ()
     894  (#_GetLastError()))
     895
     896(defun %windows-error-string (error-number)
    893897  (rlet ((pbuffer :address (%null-ptr)))
    894898    (if (eql 0
     
    908912        (#_LocalFree p)
    909913        q))))
     914)
    910915       
    911916                     
     
    19451950        (format t "~%~%;;;~%;;; ~a requires access to ~a~%;;; Type (:y ~D) to yield control to this thread.~%;;;~%"
    19461951                *current-process* (shared-resource-name resource)
    1947                 (process-serial-number *current-process*)))
     1952                (process-serial-number *current-process*))
     1953        (force-output t))
    19481954      (with-lock-grabbed ((shared-resource-lock resource))
    19491955        (append-dll-node request (shared-resource-requestors resource)))
Note: See TracChangeset for help on using the changeset viewer.