I am developing a Windows console app...What are my options for forcing STDIN to ignore the keyboard, so that it only tries to execute the ReadLn command if, in fact, data has been piped to the app?
Advice for the future. If you later want to read the console output, even if you are redirected, you can do so by opening a file with a special name 'CONIN$'.