Auto merge of #5557 - ehuss:linux-cbfct, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 22 May 2018 14:08:52 +0000 (14:08 +0000)
committerbors <bors@rust-lang.org>
Tue, 22 May 2018 14:08:52 +0000 (14:08 +0000)
commit099a622298cf14fd6492c7f46208b673a4b4d53b
treefb22e8934cdca2dad977e9fd4d34c25f5ad95ed7
parent64f8f1b72f6afaa2fcc01e30537e3efdb1d651f2
parent83e87d42128d07bef733c26bd395d69e99c98655
Auto merge of #5557 - ehuss:linux-cbfct, r=alexcrichton

Fix test failure in changing_bin_features_caches_targets for Linux.

Fixes rust-lang/rust#50962.

My theory is that while copying the binary, another thread forked with the fd
open.  The copy finishes and attempts to exec before the other child execs (and
closes the writeable fd).

I was able to easily repro this on linux.  I ran some stress tests of this fix
locally on linux and on appveyor, and was unable to trigger it again.