How to check if theres something in STDIN

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

How do i check if there is something new in STDIN?

I ran into this problem when i was doing some simple command line script
that takes input from STDIN. And i noticed that feof() always returns
TRUE with STDIN. Also it seems that if i fread(STDIN) and there is
nothing in STDIN, it waits forever for input. So i was wondering if
there is some way to check how much stuff there is in STDIN and then
read it, because i dont want to wait for the input forever.

Site Timeline