Default to /dev/null if stdin does not have a fileno (for example, a memory-only file buffer)