[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #9330 [Pluggable transport]: Pluggable Transports on windows are killed with ProcessTerminate



#9330: Pluggable Transports on windows are killed with ProcessTerminate
--------------------------------------------+-------------------------------
 Reporter:  yawning                         |          Owner:  asn             
     Type:  defect                          |         Status:  new             
 Priority:  normal                          |      Milestone:                  
Component:  Pluggable transport             |        Version:  Tor: unspecified
 Keywords:  pt, win32, pluggable transport  |         Parent:                  
   Points:                                  |   Actualpoints:                  
--------------------------------------------+-------------------------------

Comment(by infinity0):

 Summary of relevant info I found whilst doing research for #9376:

 - Windows has signals (including "SIGINT" and "SIGTERM") but these can
 only be sent to the same process[1]
 - However, it does have console events CTRL-C and CTRL-BREAK which can be
 sent to certain child processes [2]
 - By default, CTRL-C generates a SIGINT within the process, and CTRL-BREAK
 always generates a SIGBREAK (windows equivalent of SIGQUIT). I haven't
 found explicit statement of this, but I believe this is the correct way of
 interpreting [3]
 - It's theoretically possible to trap CTRL-C as SIGINT but it's broken in
 python 2.7 and they declined to fix it[4]
 - It is possible to send and trap CTRL-BREAK on python (os.kill /
 signal.signal) and C/C++, (GenerateConsoleCtrlEvent /
 SetConsoleCtrlHandler), so one option is to appropriate this for SIGTERM
 purposes, but we would need to update the PT spec to explicitly say this,
 since there is no standard behaviour for CTRL-BREAK and clients won't just
 assume this. (OTOH I am guessing Tor sends a SIGTERM on UNIX as that *is*
 the standard way to request a graceful shutdown.)

 [1] http://blogs.msdn.com/b/shrib/archive/2008/05/23/signals-on-
 windows.aspx
 [2] http://docs.python.org/2/library/os.html#os.kill
 [3] http://msdn.microsoft.com/en-us/library/ms686016.aspx
 [4] http://bugs.python.org/issue18040

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/9330#comment:1>
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