View Single Post
Old May 22nd, 2005, 9:21 AM   #2
Nuticulus
Programmer
 
Nuticulus's Avatar
 
Join Date: May 2005
Location: England
Posts: 61
Rep Power: 4 Nuticulus is on a distinguished road
If you're piping stdout of dmesg to the stdin of ./example, can you provide stdin from the keyboard also? Just wondering.

Edit: thinking about it, if you've reached EOF, getchar() will return EOF instantly, because there's absolutely nothing left to be read. And you can't just magically give it input from stdin, because that comes from the program piping input, not your keyboard.

I'm puzzled as to why you made this program. Why not just pipe output to /dev/null?

Last edited by Nuticulus; May 22nd, 2005 at 9:38 AM.
Nuticulus is offline   Reply With Quote