Skip to content

Conversation

@kurahaupo
Copy link

@kurahaupo kurahaupo commented Sep 28, 2021

Don't close stdin, even at end-of-file.
(Although this doesn't affect the code as it stands, it makes it brittle when incorporating into a larger program, where closing fd#0 could lead to it being reassigned to some other purpose.)

When '-' is used as the input or output name, use stdin or stdout instead (in line with POSIX guidelines).

@kolyshkin
Copy link
Contributor

@kurahaupo can you please add a test case, checking that - works as input and output?

@kurahaupo
Copy link
Author

@kolyshkin I can't find the existing tests of using stdin & stdout. If you could kindly point me at the relevant file(s) I will modify it(them) accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants