Depends. Which stdin operation are you trying to EOF? If stdin is console input, do what aluser said. If the ONLY thing you want to send is EOF, use 'echo -n | (your program)'. If you are sending it FROM your C program, you are pretty much stuck with exiting from the program, at which point the state of its stdout will be EOF, which will in turn be reflected in whichever stdin it was redirected to. I'm pretty sure you can't just send EOF from within C without getting a hold of an underlying buffer, which aren't standardized, and therefore would leave you with some dirty programming to do.
ta0kira
|