KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a popen() function which executes tail -f sometextfile . Aslong as there is data in the filestream obviously I can get the data through fgets() . Now, if no new data comes from tail, fgets() hangs. I tried ferror() and feof() to no avail. How can I make sure fgets() doesn't try to read data when nothing new is in the file stream? One of the suggestion was select() . Since this is for Windows Platform select doesn't seem to work as anonymous pipes do not seem to work for it (see this post ).
Tags (comma-separated)
Save Edits
Cancel