rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.31k stars 328 forks source link

Implement pipe/pipe2 #3746

Closed tiif closed 3 weeks ago

tiif commented 1 month ago

As mentioned in https://github.com/rust-lang/miri/issues/3442#issuecomment-2097703842, it is fairly easy to implement pipe/pipe2 after https://github.com/rust-lang/miri/pull/3609. The main difference between socketpair and pipe is socketpair is bidirectional where pipe is unidirectional, other logics should be similar. The usage is also quite high according to the shim wishlist.

RalfJung commented 1 month ago

The usage is also quite high according to https://github.com/rust-lang/miri/issues/2057.

I suspect most of that is due to uses of Command, which involves constructing a pipe... so adding support for pipe2 will just lead to a slightly nicer error, saying that fork is not supported. But that's still a nice improvement, fork is the actual culprit here and I don't think we'll ever support it.