https://github.com/nodejs/node/issues/7439
The above page shows that fs.readFileSync(process.stdin.fd) does not work correctly.
Is fs.readFileSync(fs.openSync('/dev/stdin', 'rs')) the correct way to read from stdin? But it seems that it only works in certain cases, but not all case.
I am wondering what is the correct way to read from stdin in nodejs.