fix a bug

This commit is contained in:
Max Lv
2012-12-20 09:10:53 +08:00
parent 7a52f700e7
commit cb5266f90c
+2 -2
View File
@@ -112,12 +112,12 @@ public class Utils {
pipe = createSubprocess(pid, getShell());
}
if (result == null || pipe == null) return;
if (pid[0] != -1) {
exitcode = Exec.waitFor(pid[0]);
}
if (result == null || pipe == null) return;
final InputStream stdout = new FileInputStream(pipe);
final byte buf[] = new byte[8192];
int read = 0;