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:
Michael Bayne
2007-08-04 23:57:57 +00:00
parent 92d61bca41
commit f7e0726a5c
@@ -631,6 +631,11 @@ public abstract class Getdown extends Thread
} else {
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
// the process fill its output buffer and choke, yay!
final InputStream stderr = proc.getErrorStream();