[tor-bugs] #34211 [Core Tor/Tor]: Add support for control signals (ex. Ctrl+C) in Windows

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed May 13 19:15:19 UTC 2020


#34211: Add support for control signals (ex. Ctrl+C) in Windows
-------------------------------------------------+-------------------------
 Reporter:  TheDcoder                            |          Owner:  (none)
     Type:  enhancement                          |         Status:  new
 Priority:  Medium                               |      Component:  Core
                                                 |  Tor/Tor
  Version:  Tor: unspecified                     |       Severity:  Normal
 Keywords:                                       |  Actual Points:
  control,termination,signals,windows,winapi     |
Parent ID:                                       |         Points:
 Reviewer:                                       |        Sponsor:
-------------------------------------------------+-------------------------
 Hi everyone!

 I am working on a [https://github.com/DcodingTheWeb/ProxAllium/tree/next-
 gen cross-platform Tor controller/wrapper], and I encountered a minor
 inconvenience while writing code for stopping Tor in Windows.

 Currently the only way to gracefully terminate Tor in Windows is to use
 the control port to issue the `SIGINT` signal, it would be beneficial for
 3rd party programs which work with Tor to be able to invoke this procedure
 by using the native "control signals" provided to console programs in
 Windows.

 I have made a patch which implements this functionality, I will post it
 soon, I am creating this ticket so that I can create a corresponding file
 in the `changes` directory :)

 Thanks to nickm for some pointers about using the libevent `event_active`
 function to trigger the event, I decided to use the `activate_signal`
 function as it internally calls the suggested function and simplifies the
 code.

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


More information about the tor-bugs mailing list