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

Incorrect output on broken pipe #51

Open
jakubtuchol opened this issue Jul 17, 2015 · 0 comments
Open

Incorrect output on broken pipe #51

jakubtuchol opened this issue Jul 17, 2015 · 0 comments

Comments

@jakubtuchol
Copy link

I'm currently running joe-0.0.6. When you pipe joe to a command that doesn't exist, you get the following behavior:

$ joe java | hello
-bash: hello: command not found
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

I looked into this behavior, and it turns out to be a bug in the Python 2.7 interpreter: the interpreter is not reporting an exception when failing to flush stdout. More about this can be found here and here.

I believe this behavior can be fixed by simply adding sys.stdout.flush() to the bottom of the main method.

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

No branches or pull requests

1 participant