Re: Control Pipe

"Michal Nazarewicz" <[email protected]>
Newsgroups gmane.comp.gnome.apps.gkrellm
Organization http://mina86.com/
Message-ID <[email protected]>
On Sun, 25 Jun 2006 18:41:03 +0200, Patrice Levesque wrote:

> Maybe a D-BUS based interface is cleaner than pipes?  I just bring this  
> up, I
> really don't know how much work would be involved.

I have an impression that it's like using a canon to kill a mosquito. It  
sure solves a problem of two applications writing to a pipe at the same  
moment and provides a bi-directional communicatioon but is (IMO) a bit too  
complex.

BTW. I've found out why select() didn't work. If anyone is interested, you  
have to move calls of FD_* macros inside the do loop in thread_func  
function, ie:

	do {
		/* Wait for data */
		FD_ZERO(&rfds);
		FD_SET(fd, &rfds);
		tv.tv_sec = 1;
		tv.tv_usec = 0;
		if (select(fd+1, &rfds, 0, 0, &tv)<=0) continue;



-- 
Pozdrawiam                                            _     _
  .o. | Wasal Jasnie Oswieconej Pani Informatyki     o' \,=./ `o
  ..o | Michal "mina86" Nazarewicz  <mina86*tlen.pl>    (o o)
  ooo +--<jid:mina86*jabber.org>---<tlen:mina86>----ooO--(_)--Ooo--

_______________________________________________
Gkrellm mailing list
[email protected]
http://ninja.linux-phreak.biz/mailman/listinfo/gkrellm
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.