-
Notifications
You must be signed in to change notification settings - Fork 335
Infrastructure: allow passing stdin to subprocesses. #1134
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
Conversation
|
Maybe we should support a streaming interface for #1043 so that it is not necessary to put the whole file chunk into RAM. |
| void close_handle_mark_invalid(HANDLE& target) noexcept | ||
| { | ||
| auto to_close = std::exchange(target, INVALID_HANDLE_VALUE); | ||
| if (to_close != INVALID_HANDLE_VALUE && to_close) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this checking to_close for null here -- and should that be a fatal error since it's an invariant violation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some APIs use 0 as 'invalid handle', others use INVALID_HANDLE_VALUE. The intent is for this to work with either without having to worry about which is which.
It seems like 1043 should work by attaching the file directly rather than needing to describe the right concurrency ... thing that would have to go here. |
72f7336 to
e109bb6
Compare
…eads-stdin.c. Co-authored-by: Robert Schumacher <[email protected]>
e109bb6 to
3439c70
Compare
… pipe in order to resolve deadlocking trying to write stdin while stdout is pending.
…n moves for everything. Always explicitly name all handles to inherit when launching children. RAIIize control C handling.
d7ac556 to
c78bf7f
Compare
Co-authored-by: Kevin Lalumiere <[email protected]>
klalumiere
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the attribution for the changes in downloads.cpp! 🙂
We need this capability to call
git mktree.The temporary-file-less fix to #1144 was authored by https://github.com/klalumiere