Patch from Elias to close stdin and stdout of our launched process. If we had a
Win98 machine around we could test whether closing stderr prevents the buffer fill-up deadlock that necessitates leaving the Getdown process around to read stderr on that platform, but I vaguely recall having tried that and having it not work.
This commit is contained in:
@@ -631,6 +631,11 @@ public abstract class Getdown extends Thread
|
|||||||
} else {
|
} else {
|
||||||
Process proc = _app.createProcess();
|
Process proc = _app.createProcess();
|
||||||
|
|
||||||
|
// close standard in to avoid choking standard out of the launched process
|
||||||
|
proc.getInputStream().close();
|
||||||
|
// close standard out, since we're not going to write to anything to it anyway
|
||||||
|
proc.getOutputStream().close();
|
||||||
|
|
||||||
// on Windows 98 and ME we need to stick around and read the output of stderr lest
|
// on Windows 98 and ME we need to stick around and read the output of stderr lest
|
||||||
// the process fill its output buffer and choke, yay!
|
// the process fill its output buffer and choke, yay!
|
||||||
final InputStream stderr = proc.getErrorStream();
|
final InputStream stderr = proc.getErrorStream();
|
||||||
|
|||||||
Reference in New Issue
Block a user