[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #10006 [Pluggable transport]: Build an obfs-flash PT bundle
#10006: Build an obfs-flash PT bundle
-------------------------------------+-------------------
Reporter: dcf | Owner: dcf
Type: task | Status: new
Priority: normal | Milestone:
Component: Pluggable transport | Version:
Resolution: | Keywords:
Actual Points: | Parent ID: #7167
Points: |
-------------------------------------+-------------------
Comment (by dcf):
Here are some things I found while web searching around, that may have
been also touched on in IRC.
[http://stackoverflow.com/questions/53208/how-do-i-automatically-
destroy-child-processes-in-windows/53214#53214 How do I automatically
destroy child processes in Windows?][[BR]]
The Windows API supports objects called "Job Objects". The following
code will create a "job" that is configured to shut down all processes
when the main application ends (when its handles are cleaned up).
The code sample there uses Windows API functions:
* [http://msdn.microsoft.com/en-us/library/ms682409%28v=vs.85%29.aspx
CreateJobObject]
* [http://msdn.microsoft.com/en-us/library/ms686216(v=vs.85).aspx
SetInformationJobObject]
* [http://msdn.microsoft.com/en-us/library/ms681949%28v=vs.85%29.aspx
AssignProcessToJobObject]
These API function are available in the
[http://sourceforge.net/projects/pywin32/ pywin32] library, which we
already include in the browser bundle because it is a dependency of
Twisted.
* [http://timgolden.me.uk/pywin32-docs/win32job.html win32job]
infinity0, what do you think of trying the CreateJobObject technique in
subproc as a workaround until #9330 is fixed? The problem is that I
foresee a solution to #9330 being several weeks off. I'm not sure if it
will work, but if it does, (1) even if not 100% correct, it's correct
enough to solve the "run Vidalia twice" problem, and (2) we can implement
it locally, without necessitating new Tor and vanilla bundle releases.
The main difficulty I foresee is that the subprocess module may not give
visibility to the handle under the Popen object (maybe
[http://docs.python.org/2/library/msvcrt.html#msvcrt.get_osfhandle
msvcrt.get_osfhandle] will work?). It'd be great to be able to test this
idea, without completely rewriting subproc to use CreateProcess etc.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/10006#comment:13>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs