[tor-bugs] #9376 [Pluggable transport]: subprocess management module for pyptlib
Tor Bug Tracker & Wiki
blackhole at torproject.org
Fri Aug 2 15:47:57 UTC 2013
#9376: subprocess management module for pyptlib
---------------------------------+------------------------------------------
Reporter: infinity0 | Owner: asn
Type: enhancement | Status: needs_revision
Priority: normal | Milestone:
Component: Pluggable transport | Version:
Keywords: pyptlib | Parent:
Points: | Actualpoints:
---------------------------------+------------------------------------------
Changes (by asn):
* status: new => needs_revision
Comment:
Code looks good. Some comments:
- The code logic looks reasonable, but some tests would give us much more
confidence. Can you write integration tests that spin up a bunch of
processes, killall them, SIGINT them, and check that the code works as
intended?
-
{{{
+a = inspect.getargspec(subprocess.Popen.__init__)
+_Popen_defaults = zip(a.args[-len(a.defaults):],a.defaults); del a
}}}
Seems like the above code peaks into the original subprocess module and
gets the default Popen options, which are later used in your mock Popen.
Is there a cleaner/standard way of doing this?
- `_SIGINT_RUN` is a global dict and its variable name is in capitals. Is
there a special meaning to the capitals?
- Wanna add a ChangeLog entry? :)
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9376#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list