Make a build's stdin /dev/null

Subj, since a build cannot receive any input.

This will fix hangs for utilities that try to read stdin by default (openssl is the one I bumped into recently).

Sorry? What is the problem?

The problem is that some utilities read from stdin when you don’t expect it. This is not a problem when running commands locally but bites one in the rear in a batch job.

Since interactive input is not possible in Travis anyway, this will not break anything, so it will be a strict improvement.

Regarding prior art, e.g. GNU make does this when executing in parallel.

Then instruct those utilities to read from /dev/null: < /dev/null

I posit that STDIN is what most users and utilities expect, and changing this behavior will break a lot of things.

I’m not proposing to take it away completely (AFAIK you can’t do that anyway, it’s a part of UNIX machinery that every process has).

Current stdin already acts like /dev/null – since no data is ever present on it. But reading from it hangs instead of producing EOF – which makes no practical sense.

I propose that it returns EOF instead. It would be as if the user pressed Ctrl-D.