From cb5266f90c5e1839eee449e84fac7e7fcfea1fe7 Mon Sep 17 00:00:00 2001 From: Max Lv Date: Thu, 20 Dec 2012 09:10:53 +0800 Subject: [PATCH] fix a bug --- src/com/github/shadowsocks/Utils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;