commit 87411bea855e678fc9835da68076219d49e25c07 Author: Nathan Freitas nathan@freitas.net Date: Sat Feb 22 19:16:47 2014 -0500
fix code for finding existing processes --- src/org/torproject/android/service/TorServiceUtils.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/org/torproject/android/service/TorServiceUtils.java b/src/org/torproject/android/service/TorServiceUtils.java index fde8c9e..c1f3145 100644 --- a/src/org/torproject/android/service/TorServiceUtils.java +++ b/src/org/torproject/android/service/TorServiceUtils.java @@ -91,6 +91,8 @@ public class TorServiceUtils implements TorServiceConstants { Process procPs = null; + String baseName = new File(command).getName(); + procPs = r.exec(SHELL_CMD_PS);
BufferedReader reader = new BufferedReader(new InputStreamReader(procPs.getInputStream())); @@ -98,7 +100,7 @@ public class TorServiceUtils implements TorServiceConstants {
while ((line = reader.readLine())!=null) { - if (line.indexOf(' ' + command)!=-1) + if (line.indexOf('/' + baseName)!=-1) { StringTokenizer st = new StringTokenizer(line," ");
tor-commits@lists.torproject.org