Skip to content
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

Behave more like a regular POSIX utility #78

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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.

None yet

2 participants