[vdr] MP3-plugin problems with slow cpu

Clemens Kirchgatterer clemens at 1541.org
Mon Jul 25 13:08:52 CEST 2005


Clemens Kirchgatterer <clemens at 1541.org> wrote:

> Martin Cap <macap20001 at compuserve.de> wrote:
> 
> > Today I tried to set O_NONBLOCK to the open()-calls (the code does a
> > 
> > "do{ r = read(...); }while(r!=-1 && r != EINTR);" at stream.c:271
> 
> shouldn't it be: while(r!=-1 && errno != EINTR); ?

when i think about it, i'd rather do {
	r = read(...);
} while (r >= 0 || ((r < 0) && (errno == EINTR)));

b.t.w. doesn't that eat cpu like crazy when O_NONBLOCK is set?

clemens



More information about the vdr mailing list