Changeset 13979


Ignore:
Timestamp:
Jul 18, 2010, 3:27:18 AM (9 years ago)
Author:
gb
Message:

conditionalize for Windows, other small changes

File:
1 edited

Legend:

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

    r13972 r13979  
    181181
    182182(defun wait-for-signal (s duration)
    183   (or (%timed-wait-for-signal s 0 0)
     183  (or (multiple-value-bind (result err)
     184          (%timed-wait-for-signal s 0 0)
     185        (or result
     186            (if (or (eql err #$EINTR)
     187                    (eql err #-windows-target #$ETIMEDOUT #+windows-target #$WAIT_TIMEOUT))
     188              nil
     189              (error "Error waiting for signal ~d: ~a." s (%strerror err)))))
    184190      (with-process-whostate ("signal wait")
    185191        (let* ((now (get-internal-real-time))
     
    192198                (when success
    193199                  (return t))
    194                 (if (or (eql err #$ETIMEDOUT)
     200                (if (or (eql err #-windows-target #$ETIMEDOUT #+windows-target #$WAIT_TIMEOUT)
    195201                        (>= (setq now (get-internal-real-time)) stop))
    196202                  (return nil)
    197203                  (unless (eql err #$EINTR)
    198204                    (error "Error waiting for signal ~d: ~a." s (%strerror err))))
    199                 (when (or (not (eql err #$EINTR))
    200                           (>= (setq now (get-internal-real-time)) stop))
    201                   (return nil))
    202205                (unless (zerop duration)
    203206                  (let* ((diff (- stop now)))
Note: See TracChangeset for help on using the changeset viewer.