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

Fix stdin probing on Linux #90

Merged
merged 1 commit into from Oct 15, 2011
Merged

Fix stdin probing on Linux #90

merged 1 commit into from Oct 15, 2011

Conversation

@nilbus
Copy link
Contributor

nilbus commented Sep 20, 2011

Fixes #54

Since Linux doesn't throw EAGAIN when stdin is not ready,
we can instead probe to see if stdin is a not a tty (has a pipe).
When there is nothing on stdin and no files are given, print the
usage instructions.

I'm not sure how I would go about testing this without making the test suite hang (on stdin) when it's not working.

Fixes #54

Since linux doesn't throw EAGAIN when stdin is not ready,
we can instead probe to see if stdin is a not a tty (has a pipe).
When there is nothing on stdin and no files are given, print the
usage instructions.
@nilbus
Copy link
Contributor Author

nilbus commented Sep 20, 2011

Also confirmed to work on OSX

@rstacruz
Copy link
Member

rstacruz commented Oct 15, 2011

Thank you, sir.

@rstacruz rstacruz merged commit 014cafa into js2coffee:master Oct 15, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

2 participants
You can’t perform that action at this time.