Changeset 13101


Ignore:
Timestamp:
Oct 27, 2009, 10:24:02 AM (10 years ago)
Author:
gb
Message:

In the primary PROCESS-EXIT-APPLICATION, don't assume that the lock on
CCL::*STDOUT* is free, even though we should be single-threaded at the
time this code is run. (SLIME may be using that stream to tellthe
user interesting things about the PROCESS-RESET condition it just
received on its control thread, and we may have had to kill that
thread since it wasn't responding to the PROCESS-RESET condition ...)

File:
1 edited

Legend:

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

    r13067 r13101  
    639639    (with-standard-abort-handling "Exit Lisp"
    640640      (prepare-to-quit)
    641       (fresh-line *stdout*)
    642       (finish-output *stdout*))
     641      ;; We may have abruptly terminated a thread
     642      ;; which owned the output lock on *STDOUT*.
     643      ;; Don't block waiting on that lock if so.
     644      (let* ((s *stdout*)
     645             (lock (ioblock-outbuf-lock (basic-stream-ioblock s)))
     646             (locked (make-lock-acquisition)))
     647        (declare (dynamic-extent locked))
     648        (when (or (null lock) (%try-recursive-lock-object lock locked))
     649          (unwind-protect
     650               (progn
     651                 (fresh-line s)
     652                 (finish-output s)))
     653          (when (lock-acquisition.status locked) (release-lock lock)))))
    643654    (%set-toplevel thunk)
    644655    (toplevel)))
Note: See TracChangeset for help on using the changeset viewer.