Re: Unix Sockets
Meredydd <[email protected]> Sat, 30 Aug 2003 12:38:59 +0100
| Newsgroups | gmane.network.everybuddy.user |
|---|---|
| Message-ID | <[email protected]> |
Hey all, I'm back! OK, first things first: --pipes. The pipes option is used when you launch the core from your UI. From the looks of what you're doing, I think that's what you're after. If you don't want it to listen on TCP, there's an option for that (whose name I unfortunately can't remember, sorry - check --help). Anyway, it's done by creating two anonymous pipes in your program, fork()ing, closing the ends of the pipes each of the resulting processes won't be using, and then exec()ing the core, specifying the file descriptors on which these pipes are located. The pipes will stay open across the exec(), and the core will start treating the pipes like an already-authenticated UI. If you want an example of how to do this, look at the source in the core/GUIcomms directory. I oppose using UNIX sockets, because: (*) they're no different to TCP sockets as far as usability or security goes (permissions checking is NOT done on UNIX sockets under many flavours) (*) they create untidy messes in temporary directories (*) they're not portable away from UNIX systems If you're going to start the core from your UI, use the --pipes option. If you want to open it to subsequent connections, I still remain convinced that TCP is the best way around. Why not catch me about this and explain why you want UNIX-domain sockets? If there's a good reason, I try to be open-minded enough to be pursuaded. blip109 on AIM, [email protected] as long as MSN is working (and yes, that's a whole new can of worms...). As for subversion/CVS: no, sorry, I'm sticking with subversion. CVS is too much hassle. If you want to look at the repos without downloading the client, check out the nightly tarballs on the website. Meredydd On Wednesday 06 August 2003 15:50, Rodney Dawes wrote: > Ugh. Sorry. I suppose I was confused by the --pipes option for > eb-lite. Is there any documentation or example for using this, > instead of the TCP? It's probably best to use AF_UNIX instead, but > that requires adding a command line option or something so that you > can specify the filename to use for the socket. Particularly, I don't > want to be creating a bunch of these in /tmp. If I can figure out how > to use the --pipes stuff for now, I can get at least start getting my > GUI working with it. > > On another note, I noticed many problems in the core when I tried to > go and make distcheck a tarball from it, to copy to my other machine, > as I don't use/want QT, so having that source is a bit moot to me. Is > there any way I can get eb-lite core with cvs instead of subversion? > I'd rather not have to install yet another revision control system, > just for one project, let alone learn it. :) Thanks. > > -- dobey