Return stdin to blocking state when closing.

GitOrigin-RevId: db4f43a526b099f07dbc5c1c717cc4e67aad5ee7
This commit is contained in:
levlam 2019-03-22 01:59:16 +03:00
parent 59b98c5b50
commit d494a3e13f

View File

@ -147,6 +147,7 @@ class BufferedStdinImpl {
BufferedStdinImpl(BufferedStdinImpl &&) = delete; BufferedStdinImpl(BufferedStdinImpl &&) = delete;
BufferedStdinImpl &operator=(BufferedStdinImpl &&) = delete; BufferedStdinImpl &operator=(BufferedStdinImpl &&) = delete;
~BufferedStdinImpl() { ~BufferedStdinImpl() {
file_fd_.get_native_fd().set_is_blocking(true);
file_fd_.move_as_native_fd().release(); file_fd_.move_as_native_fd().release();
} }