On Friday 25 March 2005 00:18, Reinhard Nissl wrote: > Hi, > > I'm facing a deadlock situation, when the below code is modified to > ignore the "r == 0" cases (= original code in vdr-xine-0.7.2): r==0 means that there is no data available. Are you sure you want to block in xread until data is available? If you want to ignore the r==0 cases, why don't you simply open the file in blocking mode (remove O_NONBLOCK from xineLib.c:2160) ? If you want to wait for data (and keep the non-blocking) you should wait some time (200ms or so). If you are not sure about the cPoller, use the select function with a timeout. Then you get exact error codes and all that. Kind regards, Stefan