Workaround of hangup of stdin() on Linux