[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] make sure we don't have any orphaned pdnsd processes



commit be5b8d885e345ddc1d0fd335d8892847476150a4
Author: n8fr8 <nathan@xxxxxxxxxxxxxxxxxxxx>
Date:   Wed Jul 31 16:35:26 2019 -0400

    make sure we don't have any orphaned pdnsd processes
---
 orbotservice/build.gradle                                          | 2 +-
 .../java/org/torproject/android/service/vpn/OrbotVpnManager.java   | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/orbotservice/build.gradle b/orbotservice/build.gradle
index e3045712..7e933c7f 100644
--- a/orbotservice/build.gradle
+++ b/orbotservice/build.gradle
@@ -32,7 +32,7 @@ android {
 }
 
 dependencies {
-   // implementation project(':jsocksAndroid')
+
     implementation 'org.torproject:tor-android-binary:0.4.0.4-rc'
     implementation 'info.pluggabletransports.aptds:apt-dispatch-library:1.0.6'
     implementation 'info.pluggabletransports.aptds:apt-meek-obfs4-legacy:1.0.6'
diff --git a/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java b/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java
index 40ea51af..c843c183 100644
--- a/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java
+++ b/orbotservice/src/main/java/org/torproject/android/service/vpn/OrbotVpnManager.java
@@ -95,6 +95,13 @@ public class OrbotVpnManager implements Handler.Callback {
 
 		filePdnsd = CustomNativeLoader.loadNativeBinary(service.getApplicationContext(),PDNSD_BIN,new File(service.getFilesDir(),PDNSD_BIN));
 
+		// if that fails, try again using native utils
+		try {
+			killProcess(filePdnsd, "-1"); // this is -HUP
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
 		Tun2Socks.init();
 
 



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits