[slime-cvs] CVS update: slime/swank-clisp.lisp
Helmut Eller
heller at common-lisp.net
Mon Feb 16 21:40:56 UTC 2004
Update of /project/slime/cvsroot/slime
In directory common-lisp.net:/tmp/cvs-serv4064
Modified Files:
swank-clisp.lisp
Log Message:
(set-sigio-handler, add-input-handler): Conditionalize for linux.
Date: Mon Feb 16 16:40:55 2004
Author: heller
Index: slime/swank-clisp.lisp
diff -u slime/swank-clisp.lisp:1.17 slime/swank-clisp.lisp:1.18
--- slime/swank-clisp.lisp:1.17 Sun Feb 8 14:19:42 2004
+++ slime/swank-clisp.lisp Mon Feb 16 16:40:55 2004
@@ -95,23 +95,27 @@
(defvar *saved-sigio-handler*)
-(defun set-sigio-handler ()
- (setf *saved-sigio-handler*
- (linux:set-signal-handler linux:SIGIO
- (lambda (signal) (sigio-handler signal))))
- (let* ((action (linux:signal-action-retrieve linux:SIGIO))
- (flags (linux:sa-flags action)))
- (setf (linux:sa-flags action) (logior flags linux:SA_NODEFER))
- (linux:signal-action-install linux:SIGIO action)))
+#+linux
+(progn
+ (defun set-sigio-handler ()
+ (setf *saved-sigio-handler*
+ (linux:set-signal-handler linux:SIGIO
+ (lambda (signal) (sigio-handler signal))))
+ (let* ((action (linux:signal-action-retrieve linux:SIGIO))
+ (flags (linux:sa-flags action)))
+ (setf (linux:sa-flags action) (logior flags linux:SA_NODEFER))
+ (linux:signal-action-install linux:SIGIO action)))
-(defimplementation add-input-handler (socket fn)
- (set-sigio-handler)
- (let ((fd (socket:socket-stream-handle socket)))
- (format *debug-io* "Adding input handler: ~S ~%" fd)
- ;; XXX error checking
- (linux:fcntl3l fd linux:F_SETOWN (getpid))
- (linux:fcntl3l fd linux:F_SETFL linux:O_ASYNC)
- (push (cons fd fn) *sigio-handlers*)))
+
+ (defimplementation add-input-handler (socket fn)
+ (set-sigio-handler)
+ (let ((fd (socket:socket-stream-handle socket)))
+ (format *debug-io* "Adding input handler: ~S ~%" fd)
+ ;; XXX error checking
+ (linux:fcntl3l fd linux:F_SETOWN (getpid))
+ (linux:fcntl3l fd linux:F_SETFL linux:O_ASYNC)
+ (push (cons fd fn) *sigio-handlers*)))
+ )
(defimplementation remove-input-handlers (socket)
(let ((fd (socket:socket-stream-handle socket)))
More information about the slime-cvs
mailing list