Re: poll() returns even if there is data.

2010-07-23 Thread Konstantin Svist
On 07/22/2010 09:31 PM, Mansuri, Wasim (NSN - IN/Bangalore) wrote: > I am trying to read some file using open and read system calls. > > Here in my code I am doing open than poll and if poll returns with the event > POLLIN than read. > Even if poll returns with the event POLLIN read returns 0, t

Re: poll() returns even if there is data.

2010-07-23 Thread Siddhesh Poyarekar
On Fri, Jul 23, 2010 at 10:01 AM, Mansuri, Wasim (NSN - IN/Bangalore) wrote: > Here in my code I am doing open than poll and if poll returns with the event > POLLIN than read. > Even if poll returns with the event POLLIN read returns 0, that means no data. > > I am pasting code snip below. > >  

Re: poll() returns even if there is data.

2010-07-23 Thread Roberto Ragusa
Mansuri, Wasim (NSN - IN/Bangalore) wrote: > My question here is, > Am I using poll() properly? > can we use poll to read the files like I am reading? > If we can not use poll than is there any other way using which I can > get to know if there is some data in the file after I

poll() returns even if there is data.

2010-07-23 Thread JB
Ed Greshko greshko.com> writes: > ... > If, however, you can't resist answering queries that you find "out of > line" I find it best to visualize standing next to the person asking the > question and that person is 6ft tall, 220 lbs, with a scar on their > face, and a .45 tucked in their waistban

Re: poll() returns even if there is data.

2010-07-23 Thread JD
On 07/22/2010 11:47 PM, Ed Greshko wrote: > On 07/23/2010 02:23 PM, JB wrote: >> you are repeatedly posting to a wrong group - this is Fedora. >> Please find UNIX or Linux, system or application programming, your language >> (C, C++, etc) group. >> Otherwise you are making fool of yourself. > W

Re: poll() returns even if there is data.

2010-07-22 Thread Paul Allen Newell
On 7/22/2010 11:47 PM, Ed Greshko wrote: > On 07/23/2010 02:23 PM, JB wrote: > > If, however, you can't resist answering queries that you find "out of > line" I find it best to visualize standing next to the person asking the > question and that person is 6ft tall, 220 lbs, with a scar on the

Re: poll() returns even if there is data.

2010-07-22 Thread Ed Greshko
On 07/23/2010 02:23 PM, JB wrote: > you are repeatedly posting to a wrong group - this is Fedora. > Please find UNIX or Linux, system or application programming, your language > (C, C++, etc) group. > Otherwise you are making fool of yourself. Why would you say something like that to anyone? gcc

poll() returns even if there is data.

2010-07-22 Thread JB
Mansuri, Wasim (NSN - IN/Bangalore nsn.com> writes: > > > I am trying to read some file using open and read system calls. > ... Hi, you are repeatedly posting to a wrong group - this is Fedora. Please find UNIX or Linux, system or application programming, your language (C, C++, etc) group. Oth

poll() returns even if there is data.

2010-07-22 Thread Mansuri, Wasim (NSN - IN/Bangalore)
I am trying to read some file using open and read system calls. Here in my code I am doing open than poll and if poll returns with the event POLLIN than read. Even if poll returns with the event POLLIN read returns 0, that means no data. My question here is, Am I using poll() proper