Ignore:
Timestamp:
Dec 12, 2008, 6:14:08 PM (11 years ago)
Author:
gz
Message:

fix monitor-external-process to not get confused when an fd is closed
with an output stream that is also used by another, unclosed, fd.

This made rebuild-ccl fail for me, every time, I don't understand why
it doesn't fail for others, but I think this change is correct in
any case.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/linux-files.lisp

    r11448 r11513  
    11801180                          (declare (fixnum n))
    11811181                          (if (<= n 0)
    1182                             (progn
    1183                               (without-interrupts
    1184                                (decf (car token))
    1185                                (fd-close in-fd)
    1186                                (setq in-fds (delete in-fd in-fds)
    1187                                      out-streams (delete out-stream out-streams)
    1188                                      changed t)))
     1182                            (without-interrupts
     1183                              (decf (car token))
     1184                              (fd-close in-fd)
     1185                              ;; Delete, watching out for the same out-stream being used
     1186                              ;; for different fds
     1187                              (loop for fds on in-fds as streams on out-streams
     1188                                    do (when (eq (car fds) in-fd)
     1189                                         (setf (car fds) :delete (car streams) :delete)))
     1190                              (setq in-fds (delete :delete in-fds)
     1191                                    out-streams (delete :delete out-streams)
     1192                                    changed t))
    11891193                            (let* ((string (make-string 1024)))
    11901194                              (declare (dynamic-extent string))
Note: See TracChangeset for help on using the changeset viewer.