[tor-bugs] #27947 [Core Tor/Tor]: Chutney's owning controller process code compares strings with ints

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Oct 17 07:04:34 UTC 2018


#27947: Chutney's owning controller process code compares strings with ints
--------------------------+--------------------------
 Reporter:  teor          |          Owner:  teor
     Type:  defect        |         Status:  assigned
 Priority:  Medium        |      Milestone:
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:                |  Actual Points:
Parent ID:                |         Points:
 Reviewer:                |        Sponsor:
--------------------------+--------------------------

Comment (by teor):

 Replying to [comment:4 opara]:
 > Would you be okay with a patch that moves these lines out of the
 `TorNet.py` file and into the `test-network.sh` script? It would make more
 sense to me to keep these out of `TorNet.py` since these three environment
 variables don't seem relevant to Chutney as a whole, but more just for the
 test network script.
 >
 > On the other hand there may be reasons why they were put in `TorNet.py`,
 and in that case, I can submit a patch which fixes the problem directly
 (wraps the `os.environ.get()` in an `int()` call).

 When CHUTNEY_CONTROLLING_PID is set, chutney sets the
 `__OwningControllerProcess` torrc option, so that tor exits when chutney
 is finished. But when any of these environmental variable are negative
 numbers, the user wants tor to keep running after chutney exits, so we
 don't set `__OwningControllerProcess`.

 So we need to patch TorNet.py to cast the str8ngs to ints.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27947#comment:5>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list