]> git.lizzy.rs Git - rust.git/commit
Don't read forever on a file descriptor
authorAlex Crichton <alex@alexcrichton.com>
Mon, 6 Jan 2014 22:17:23 +0000 (14:17 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 7 Jan 2014 00:32:51 +0000 (16:32 -0800)
commit03e91573c73dbaa6afc905c6b14df4bb327589c9
tree5518b4e70db6ece31171438d7eb74ca4393d59bc
parent3afa0b97c4ce81b3bbfd1e0dd4a6609742957678
Don't read forever on a file descriptor

Similarly to the recent commit to do this for networking, there's no reason that
a read on a file descriptor should continue reading until the entire buffer is
full. This makes sense when dealing with literal files, but when dealing with
things like stdin this doesn't make sense.
src/libnative/io/file.rs
src/libnative/lib.rs
src/libstd/io/pipe.rs