Auto merge of #4477 - alexcrichton:fix-out-of-bounds, r=matklad
Auto merge of #4477 - alexcrichton:fix-out-of-bounds, r=matklad

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.

nipunn1313/cargo,tshepang/cargo,vojtechkral/cargo,tsurai/cargo,tshepang/cargo,achanda/cargo,nipunn1313/cargo,eminence/cargo,eminence/cargo,rust-lang/cargo,rust-lang/cargo,rustyhorde/cargo,nipunn1313/cargo,vojtechkral/cargo,tsurai/cargo,rustyhorde/cargo,rustyhorde/cargo,rust-lang/cargo,achanda/cargo,rust-lang/cargo,vojtechkral/cargo,achanda/cargo,tsurai/cargo,tsurai/cargo,nipunn1313/cargo,tshepang/cargo,tshepang/cargo,eminence/cargo,rustyhorde/cargo,tsurai/cargo,achanda/cargo,eminence/cargo,vojtechkral/cargo