diff --git a/src/com/github/shadowsocks/Utils.java b/src/com/github/shadowsocks/Utils.java index 64356b0b..86e04722 100755 --- a/src/com/github/shadowsocks/Utils.java +++ b/src/com/github/shadowsocks/Utils.java @@ -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;