Repository navigation
Conversation
f38e2f5 to
39004e0
Compare
|
I think something like |
39004e0 to
6ffab91
Compare
|
Relates to: #12210. |
dbdcd7e to
1776a3d
Compare
Merging this PR will degrade performance by 4%1 warning
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
7d4cfe4 to
a4accfa
Compare
a4accfa to
3520870
Compare
3520870 to
85ffcd4
Compare
85ffcd4 to
63ba0b3
Compare
63ba0b3 to
e76949a
Compare
e76949a to
2a64b5d
Compare
|
It might be better to have a complete reimplementation instead of delegating |
|
It is very sad that we need to re-implement |
|
dang it |
|
thanks for this PR! |
|
|
||
| #[cfg(unix)] | ||
| if self.close_stdin { | ||
| let close_stdin = || { |
There was a problem hiding this comment.
please add a SAFETY comment, like the other pre_exec calls below
There was a problem hiding this comment.
Isn't the comment just below (line 2019) enough ?
830e9be to
35cc740
Compare
|
@sylvestre I removed the fix for |
35cc740 to
690161d
Compare
690161d to
4e1fa61
Compare
| } | ||
|
|
||
| /// Used for implementing [`std::io::Read`] for [`UStdin`] and [`UStdinLock`]. | ||
| macro_rules! impl_read_stdin_closed { |
There was a problem hiding this comment.
Personally, I'd prefer repeated implementation (like the standard library does) over using macro here, especially as it is only repeated twice.
There was a problem hiding this comment.
I originally repeated the instrumentation. I introduced the macro in response to sylvestre's comment
I have no strong opinion about this, I'm fine either way.
There was a problem hiding this comment.
I see. Given that we recommend against using macros in CONTRIBUTING.md, I would have followed the Rule of Three in this case.
4e1fa61 to
48ebbdb
Compare
|
I have an simpler idea: if Then we don't need to check that stdin was closed. |
48ebbdb to
a6bfe29
Compare
|
Binary size comparison: |
that checks for stdin closure before reading
a6bfe29 to
b66c2e7
Compare
|
GNU testsuite comparison: |
|
One more reason we need to discard current approach is #12160 . |
|
Good news for us! The |
|
This PR should certainly not be closed on the grounds of functionality that has yet to be implemented in the standard library. |
|
Closed stdio things has no actual consumers (it is actually non-POSIX). We can wait. |
|
Upstream ( |
Also uses it in
base32and derivatives,cksumand derivativesrelated to #10153