/[slime]/slime/swank-cmucl.lisp
ViewVC logotype

Diff of /slime/swank-cmucl.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.203 by heller, Sun Nov 2 12:05:13 2008 UTC revision 1.204 by heller, Wed Dec 24 07:56:20 2008 UTC
# Line 200  specific functions.") Line 200  specific functions.")
200     (when timeout (return nil))     (when timeout (return nil))
201     (multiple-value-bind (in out) (make-pipe)     (multiple-value-bind (in out) (make-pipe)
202       (let* ((f (constantly t))       (let* ((f (constantly t))
203              (handlers (loop for s in (cons in streams)              (handlers (loop for s in (cons in (mapcar #'to-fd-stream streams))
204                              collect (add-one-shot-handler s f))))                              collect (add-one-shot-handler s f))))
205         (unwind-protect         (unwind-protect
206              (handler-bind ((slime-interrupt-queued              (handler-bind ((slime-interrupt-queued
# Line 211  specific functions.") Line 211  specific functions.")
211           (close in)           (close in)
212           (close out))))))           (close out))))))
213    
214    (defun to-fd-stream (stream)
215      (etypecase stream
216        (sys:fd-stream stream)
217        (synonym-stream
218         (to-fd-stream
219          (symbol-value (synonym-stream-symbol stream))))
220        (two-way-stream
221         (to-fd-stream (two-way-stream-input-stream stream)))))
222    
223  (defun add-one-shot-handler (stream function)  (defun add-one-shot-handler (stream function)
224    (let (handler)    (let (handler)
225      (setq handler (sys:add-fd-handler (sys:fd-stream-fd stream) :input      (setq handler (sys:add-fd-handler (sys:fd-stream-fd stream) :input

Legend:
Removed from v.1.203  
changed lines
  Added in v.1.204

  ViewVC Help
Powered by ViewVC 1.1.5