You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that os::pipe() should return a Result (IoResult?) which should be passed up the chain. When I tried implementing this change, however, I quickly ran into trouble with users of the function. While some already return IoResult and can just pass the error up the chain, others don't. I wasn't sure, if I should change even more function signatures or just fail in these cases.
Since this isn't a problem for me currently and my time is very limited, I won't work further on this, sorry!
Maybe someone who understands the requirements of the calling code better might want to take a look.
The text was updated successfully, but these errors were encountered:
* os::pipe() now returns IoResult<os::Pipe>
* os::pipe() is now unsafe because it does not arrange for deallocation of file
descriptors
* os::Pipe fields are renamed from input to reader and out to write.
* PipeStream::pair() has been added. This is a safe method to get a pair of
pipes.
* Dealing with pipes in native process bindings have been improved to be more
robust in the face of failure and intermittent errors. This converts a few
fail!() situations to Err situations.
Closes#9458
cc #13538Closes#14724
[breaking-change]
* os::pipe() now returns `IoResult<os::Pipe>`
* os::pipe() is now unsafe because it does not arrange for deallocation of file
descriptors
* PipeStream::pair() has been added. This is a safe method to get a pair of
pipes.
* Dealing with pipes in native process bindings have been improved to be more
robust in the face of failure and intermittent errors. This converts a few
fail!() situations to Err situations.
cc #13538Closes#14724
[breaking-change]
The function std::os::pipe just fails if the call to libc::pipe returns an error code.
This can be easily triggered with the following program:
On my machine (Ubuntu 14.04, x86_64), the program fails at 338 processes with the following message:
I believe that os::pipe() should return a Result (IoResult?) which should be passed up the chain. When I tried implementing this change, however, I quickly ran into trouble with users of the function. While some already return IoResult and can just pass the error up the chain, others don't. I wasn't sure, if I should change even more function signatures or just fail in these cases.
Since this isn't a problem for me currently and my time is very limited, I won't work further on this, sorry!
Maybe someone who understands the requirements of the calling code better might want to take a look.
The text was updated successfully, but these errors were encountered: