views:

30

answers:

1

I am writing an automated build system to do nightly builds of our code.

Under normal conditions every thing works fine, but some of the processes in the build can require user input, if a developer commits a change that opens up one of these the automated builds grind to a halt.

Does any one know of a way of causing reads from STDIN to fail so any process that tries this will (hopefully) fail with an error? Right now I only need a solution for Linux (Ubuntu) but The system also has to run on Windows.

FYI: The automated build system is written in PHP, and in the case where this is (currently) a problem it is using buildroot to do the compilation.

+1  A: 

Read from /dev/null. It will always return EOF. This is achieved in different ways depending on how your build system is setup. A command line app can use < /dev/null, of course.

Bernard