thaliproject / Tor_Onion_Proxy_Library

Provides a JAR and an AAR for embedding the Tor Onion Proxy into a Java or Android Program
Apache License 2.0
178 stars 98 forks source link

Support __OwningControllerProcess #1

Closed yaronyg closed 10 years ago

yaronyg commented 10 years ago

On the desktop we should be able to make a platform specific call to get our PID and then pass that in using the __OwningControllerProcess argument to the Tor OP so it will confirm that the PID exists or exit. This is needed to handle a race condition where the parent creates the Tor OP and dies before issuing the TAKEOWNERSHIP command.

If we don't want to go this route then we need to actually implement killZombieProcess which is kind of scary since it requires scraping PS and killing stuff.

The ideal solution however would be for https://trac.torproject.org/projects/tor/ticket/12572 so we need to track that too

yaronyg commented 10 years ago

Michael Rogers from Briar already updated Briar to support __OwningControllerProcess so we just need to go and grab that code.

yaronyg commented 10 years ago

I actually already added in the code but I'll close this bug when I submit the PR.