[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GDS does not support Emacs 23?
From: |
William Xu |
Subject: |
Re: GDS does not support Emacs 23? |
Date: |
Sun, 24 Sep 2006 19:56:49 +0800 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) |
Neil Jerram <address@hidden> writes:
> That's interesting. How can one call bind() so that it steals the
> address and port number from a previous listen socket?
Change socket from AF_INET to AF_UNIX does the trick. The following
patch seems to work fine. Now i can call gds-server from either Emacs
sessions. I only test it with gds-help-symbol, though. And there are
still some cleanups left to do, due to socket family change.
The patch,
---------------------------------8<-------------------------------------
xiaowei:~/studio/cvs/guile-debugging$ cvs diff
cvs server: Diffing .
cvs server: Diffing ice-9
cvs server: Diffing ice-9/debugging
cvs server: Diffing ossau
Index: ossau/gds-client.scm
===================================================================
RCS file: /cvs/guile-debugging/guile-debugging/ossau/gds-client.scm,v
retrieving revision 1.20
diff -r1.20 gds-client.scm
177,181c177,178
< (let ((s (socket PF_INET SOCK_STREAM 0))
< (SOL_TCP 6)
< (TCP_NODELAY 1))
< (setsockopt s SOL_TCP TCP_NODELAY 1)
< (connect s AF_INET (inet-aton "127.0.0.1") 8333)
---
> (let ((s (socket AF_UNIX SOCK_STREAM 0)))
> (connect s AF_UNIX "/tmp/.gds_socket")
Index: ossau/gds-server.scm
===================================================================
RCS file: /cvs/guile-debugging/guile-debugging/ossau/gds-server.scm,v
retrieving revision 1.4
diff -r1.4 gds-server.scm
9c9
< ;;
---
> ;;
14c14
< ;;
---
> ;;
40,45c40,46
<
< (let ((server (socket PF_INET SOCK_STREAM 0)))
<
< ;; Initialize server socket.
< (setsockopt server SOL_SOCKET SO_REUSEADDR 1)
< (bind server AF_INET INADDR_ANY port)
---
> ;; Initialize server socket.
> (let ((server (socket AF_UNIX SOCK_STREAM 0))
> (path "/tmp/.gds_socket"))
> (catch #t
> (lambda () (delete-file path))
> (lambda key #f))
> (bind server AF_UNIX path)
70c71
< (trc "client not found")))
---
> (trc "client not found")))
cvs server: Diffing ossau/debugging
---------------------------------8<-------------------------------------
--
William
"Trust me. I know what I'm doing."
-- Sledge Hammer
- GDS does not support Emacs 23?, netawater, 2006/09/19
- Re: GDS does not support Emacs 23?, Neil Jerram, 2006/09/22
- Re: GDS does not support Emacs 23?, William Xu, 2006/09/22
- Re: GDS does not support Emacs 23?, netawater, 2006/09/23
- Re: GDS does not support Emacs 23?, Neil Jerram, 2006/09/23
- Re: GDS does not support Emacs 23?, William Xu, 2006/09/23
- Re: GDS does not support Emacs 23?, Neil Jerram, 2006/09/23
- Re: GDS does not support Emacs 23?,
William Xu <=
- Re: GDS does not support Emacs 23?, Neil Jerram, 2006/09/27