Changeset 13377 in project


Ignore:
Timestamp:
02/21/09 08:52:22 (11 years ago)
Author:
Jim Ursetto
Message:

sendfile/r3: handle EAGAIN in sendfile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/3/sendfile/trunk/sendfile.scm

    r11953 r13377  
    248248               (new-offset (%sendfile:sendfile-implementation src dst offset next-chunk)))
    249249          (cond
     250           ((eqv? -2.0 new-offset)       ; EAGAIN/EINTR
     251            (when (write-timeout)
     252              (##sys#thread-block-for-timeout!
     253               ##sys#current-thread
     254               (fx+ (##sys#fudge 16) (write-timeout))))
     255            (##sys#thread-block-for-i/o! ##sys#current-thread dst #f)
     256            (sendfile:yield)
     257            (when (##sys#slot ##sys#current-thread 13)
     258              (sendfile:error "write operation timed out"))
     259            (loop offset))
    250260           ((negative? new-offset)
    251261            (##sys#update-errno)
Note: See TracChangeset for help on using the changeset viewer.