-
Notifications
You must be signed in to change notification settings - Fork 384
Support more file operations on stdin/stdout/stderr #1499
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@samrat if you are looking for more ways to contribute, this seems like an obvious next step. :) |
@RalfJung Yes! I will take this up :) |
Awesome. :) As usual, let us know if you need any help or have any questions. |
My thinking is that we should move all operations to the trait so that |
Hmm... "worth it" sounds like there are downsides to this? The complexitiy in #1511 seems ok to me |
Well, the alternative is to keep using We have more operations that the std* handles do not support than I anticipated. I am not sure whether it is easier to just have a single method in the trait to reflect this ( |
Implement dup and close for stdin/stdout/stderr Implements some of the operations for stdin/out/err, towards #1499
Implement dup and close for stdin/stdout/stderr Implements some of the operations for stdin/out/err, towards #1499
Uh oh!
There was an error while loading. Please reload this page.
Thanks to recent work by @samrat, the standard FDs 0-2 (stdin/stdout/stderr, but I never know in which order) are now sharing the code with the FDs from opened files. However, for some operations we fall back to working on
FileHandle
directly.It should be possible to stop doing that, and support all operations also on FDs 0-2. In particular, I think it would be great to support "dup" to let a program put some file as stdout, or stdin.
In the end, all uses of
as_file_handle
should be gone, and everything work through the trait:FileMetadata::from_fd
to the trait as wellThe text was updated successfully, but these errors were encountered: