[tor-bugs] #9376 [Pluggable transport]: subprocess management module for pyptlib

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Aug 7 00:21:16 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:                
---------------------------------+------------------------------------------

Comment(by infinity0):

 Turns out you can't send SIGINT on windows (python throws OSError), and
 python transforms SIGTERM on windows into TerminateProcess (in
 subprocess.py, it defines kill = terminate for windows platforms) which
 behaves like a SIGKILL.

 One way of filling in the gaps is to have subproc manually translate
 SIGINT into a CTRL_C and SIGTERM into a CTRL_BREAK, both of which are
 possible in Python. This is the most cross-platform solution even though
 it is non-standard (and no such standard exists). Let me know if you want
 me to proceed with this. The other, simpler option is just to ditch signal
 handling / graceful shutdown on windows, including the "2-INT shutdown"
 behaviour that is part of the PT spec.

 I hate Windows.

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


More information about the tor-bugs mailing list