Auto merge of #4477 - alexcrichton:fix-out-of-bounds, r=matklad
authorbors <bors@rust-lang.org>
Sat, 9 Sep 2017 08:13:32 +0000 (08:13 +0000)
committerbors <bors@rust-lang.org>
Sat, 9 Sep 2017 08:13:32 +0000 (08:13 +0000)
Use poll instead of select to handle large fds

It may be the case that Cargo's running around with a lot of file descriptors,
and in this case we wouldn't be able to call `select` due to the file
descriptors being too large and not fitting in the bit array. This switches to
what the standard library is currently doing, using `poll`, which doesn't have
this limitations.


Trivial merge