title: How to test STDIN read error
body: <p>I have a <code>Linux</code> program (currently in assembly) that has a check: if a read from <code>STDIN</code> failed, show an error message. The problem is that I do not know how to test this condition, how to execute the program so that it will fail reading from STDIN. IT must be run without STDIn or STDIN couldbe closed some how before the program starts?</p>