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
"java.io.IOException: Broken pipe" after foo!< and a key stroke #327
Comments
This looks fixable if System.in is set to a stream which is muted until we discover the subprocess is gone, re-getting the last value read and buffered and then setting the original System.in. |
Ok, spent some time trying to fix this. Not much luck: |
Is there an actual problem here or can the Broken pipe exception just be swallowed? |
@harrah if I run
|
I think the best solution would be to display "Process finished, press any key to continue" message rather than going directly to sbt prompt. |
Ah, I see Eugene V. answered my question before I asked it. For the suggestion to prompt to continue, I don't think that solution works in general. I expect that this is a fundamental problem with the |
Java7 indeed solves the problem. Expect a pull request soon. |
Mark suggests that a problem I am having with input and sbt is the same as this issue, so he suggested I add the details here. Note that I am using Java 7 which is perhaps evidence that this is a different problem, since Eugene notes above that Java 7 fixes this issue. Setup: Mac OS X 10.7.3, sbt 0.11.2, JDK 1.7.0_04-b21 I am running a program that uses JLine 2.6. To avoid a clash with the version
Here's a log of the run:
So, I run the program using "test:run-main". All is well. JLine operates correctly and the program receives the input that it should receive. I exit the program using ^D (end of file) which correctly returns me to the sbt prompt. Then if I hit RETURN, I get the exception shown, which indicates that sbt's input stream has been closed, presumably because the ^D from the program run has been seen by it. Another RETURN gets me the prompt again and everything seems to be ok from that point onwards. |
Eugene meant that Java 7 allows us to solve the problem, not that it automatically solves the problem. |
Ah, ok. My mistake. |
Fixed by @vigdorchik in 53ee1c5..dabb0fd (for Java 7 only). |
steps
From sbt shell:
Then hit enter.
problem
expectation
No error. (It seems like the character is sent to the already-closed process)
note
This is a minimal repro of a bug reported to sbt-appengine, which spawns
appcfg.sh
.The text was updated successfully, but these errors were encountered: