public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Fw: select(), EOF...
@ 2001-08-20 20:38 Carlos Fernández Sanz
  2001-08-20 20:45 ` Ignacio Vazquez-Abrams
  0 siblings, 1 reply; 6+ messages in thread
From: Carlos Fernández Sanz @ 2001-08-20 20:38 UTC (permalink / raw)
  To: linux-kernel

(sorry if this is a dupe, I haven't seen it come from the list, so I'm
resending as plain ASCII in case majordomo kills messages with strange
stuff)

Hi,

I need to do something similar to tail -f.
I was hoping that select() or poll() would block my process after reaching
EOF but (as the man says) EOF doesn't cause read() to block so select() and
poll() both say I can read. The result is (obviously) that my program waits
actively and uses all the CPU.
What's the right way of doing this? I assume the kernel provides facilities
to find out if there is new data to read (other than EOF).

Thanks.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-08-20 21:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-08-20 20:38 Fw: select(), EOF Carlos Fernández Sanz
2001-08-20 20:45 ` Ignacio Vazquez-Abrams
2001-08-20 20:56   ` Carlos Fernández Sanz
2001-08-20 21:00     ` Ignacio Vazquez-Abrams
2001-08-20 21:09       ` Carlos Fernández Sanz
2001-08-20 21:29         ` Ignacio Vazquez-Abrams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox