On Jan 23, 2008 1:49 AM, Axel Liljencrantz <[EMAIL PROTECTED]> wrote:
> One way to get what you want is to simply use the same fishd socket on
> all machines. Can UNIX sockets be shared through e.g. NFS file shares?
> If so, your problem is already solved, just set the FISHD_SOCKET_DIR
> variable to point to the same place everywhere and it's rock and roll.
>
No.  "Another peculiarity is that you cannot connect to such a socket from
another machine-not even if the other machine shares the file system
which contains the name of the socket.  You can see the socket in a
directory listing, but connecting to it never succeeds." -- info libc

> If Unix sockets can't be shared, it would be possible to instead use a
> tcp socket. The additional code should be fairly minimal, I guess.
>
Well, yes, looks not as hard as I thought:

* tcp to which host?
  * when fishd starts, it writes its host & port to ~/.config/fish/fishd_address
  * this must be done under NFS-proof locking to prevent race condition
  * we assume here that there are no firewall issues
    * we should keep the unix socket for local connections, use tcp
for remote access only.
* what if the One and Single fishd Instance dies?
  * like now: if fishd is dead at any stage, launch new one (using
aforementioned locking)
    * small danger: fishd is not dead, but can't connect for some
network reason, so starting a new fishd.
      this is a bit dirty, because we step over ~/.config/fish/fishd_address.
      but if we always check for local socket before global, this
won't cause additional damage.

-- 
Beni Cherniavsky <[EMAIL PROTECTED]> (I read email only on weekends)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to