fix flushing stdin to not affect stdout (#249)
Merge pull request #283 from ros-infrastructure/fix_stdin_flush

fix flushing stdin to not affect stdout