read and discard zero chars to initialise STDIN

Resolves issue in cygwin on windows 8.1 where password field is skipped. See later comments of issue #2831.