Fix stdin probing on Linux #90

Merged
merged 1 commit into from Oct 15, 2011

Conversation

Projects
None yet
2 participants
@nilbus
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.

Fix stdin probing on Linux
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

This comment has been minimized.

Show comment
Hide comment
@nilbus

nilbus Sep 20, 2011

Contributor

Also confirmed to work on OSX

Contributor

nilbus commented Sep 20, 2011

Also confirmed to work on OSX

@rstacruz

This comment has been minimized.

Show comment
Hide comment
@rstacruz

rstacruz Oct 15, 2011

Member

Thank you, sir.

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