diff --git a/AndroidManifest.xml b/AndroidManifest.xml index b135d10c..d9d08b09 100755 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="8" + android:versionName="1.1.4"> diff --git a/pom.xml b/pom.xml index 98410fac..7cf510bf 100755 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.github.shadowsocks shadowsocks - 1.1.3 + 1.1.4 apk Shadowsocks diff --git a/src/com/github/shadowsocks/Utils.java b/src/com/github/shadowsocks/Utils.java index 3f3c5c69..f00d9bf1 100755 --- a/src/com/github/shadowsocks/Utils.java +++ b/src/com/github/shadowsocks/Utils.java @@ -271,6 +271,21 @@ public class Utils { private final boolean asroot; public int exitcode = -1; + private int[] pid = new int[1]; + private FileDescriptor pipe; + + @Override + public void destroy() { + if (pid[0] != -1) { + Exec.hangupProcessGroup(pid[0]); + pid[0] = -1; + } + if (pipe != null) { + Exec.close(pipe); + pipe = null; + } + } + /** * Creates a new script runner. * @@ -344,8 +359,6 @@ public class Utils { @Override public void run() { - FileDescriptor pipe = null; - int pid[] = new int[1]; pid[0] = -1; try {