mirror repository of the tor core protocol in case of issues
Go to file
Alexander Færøy bb784cf4f3 Add Windows backend for the Process subsystem.
This patch adds support for Microsoft Windows in the Process subsystem.

Libevent does not support mixing different types of handles (sockets,
named pipes, etc.) on Windows in its core event loop code. This have
historically meant that Tor have avoided attaching any non-networking
handles to the event loop. This patch uses a slightly different approach
to roughly support the same features for the Process subsystem as we do
with the Unix backend.

In this patch we use Windows Extended I/O functions (ReadFileEx() and
WriteFileEx()) which executes asynchronously in the background and
executes a completion routine when the scheduled read or write operation
have completed. This is much different from the Unix backend where the
operating system signals to us whenever a file descriptor is "ready" to
either being read from or written to.

To make the Windows operating system execute the completion routines of
ReadFileEx() and WriteFileEx() we must get the Tor process into what
Microsoft calls an "alertable" state. To do this we execute SleepEx()
with a zero millisecond sleep time from a main loop timer that ticks
once a second.  This moves the process into the "alertable" state and
when we return from the zero millisecond timeout all the outstanding I/O
completion routines will be called and we can schedule the next reads
and writes.

The timer loop is also responsible for detecting whether our child
processes have terminated since the last timer tick.

See: https://bugs.torproject.org/28179
2018-12-17 16:39:28 -05:00
changes Merge branch 'maint-0.3.5' 2018-11-27 12:03:50 -05:00
contrib Bump to 0.3.5.5-alpha-dev 2018-11-16 11:32:04 -05:00
doc Add LD_PROCESS as log domain. 2018-11-27 19:31:08 +01:00
m4 Replace obsolete macros with modern equivalents 2016-12-23 10:34:11 -05:00
scripts Merge remote-tracking branch 'tor-github/pr/519' 2018-11-19 08:47:03 -05:00
src Add Windows backend for the Process subsystem. 2018-12-17 16:39:28 -05:00
.appveyor.yml Merge branch 'maint-0.3.4' into maint-0.3.5 2018-11-27 12:03:50 -05:00
.editorconfig Add .editorconfig to follow coding standards style 2018-06-17 19:24:40 -04:00
.gitignore Move the code that knows our tor version into a lowest-level lib 2018-11-05 09:22:02 -05:00
.gitlab-ci.yml Fix spelling mistakes corresponding to ticket #23650 2018-02-07 10:41:57 -05:00
.gitmodules Update the .gitmodules to refer to project-level tor-rust-dependencies 2018-02-21 11:53:04 -05:00
.travis.yml Merge remote-tracking branch 'tor-github/pr/381' into maint-0.3.5 2018-10-30 08:39:57 -04:00
acinclude.m4 Update copyrights to 2018. 2018-06-20 08:13:28 -04:00
autogen.sh Report errors when updating configuration files 2016-12-23 10:35:26 -05:00
ChangeLog Copy 0.3.5.5-alpha changelog into master 2018-11-16 11:32:52 -05:00
CODE_OF_CONDUCT Add CODE_OF_CONDUCT file 2018-07-05 11:22:33 +03:00
config.rust.in Make the rust tests link. 2018-07-31 19:46:00 -04:00
configure.ac Merge remote-tracking branch 'isis/bug25341' into ticket25341_merged_v2 2018-11-19 09:22:30 -05:00
CONTRIBUTING Add CODE_OF_CONDUCT file 2018-07-05 11:22:33 +03:00
Doxyfile.in Fix Doxyfile for 0.3.5 source tree moves 2018-11-14 07:45:55 -05:00
INSTALL Remove old instructions from INSTALL 2018-07-03 16:34:52 +03:00
LICENSE Add the compatibility definition for getdelim.c from netbsd. 2018-07-10 10:14:24 -04:00
Makefile.am Merge remote-tracking branch 'isis/bug25341' into ticket25341_merged_v2 2018-11-19 09:22:30 -05:00
Makefile.nmake Clean up the MVSC nmake files so they work again. 2014-09-09 10:27:05 -04:00
README doc: Put the release timeline link in README 2017-11-08 10:44:00 -05:00
ReleaseNotes forward-port 0.3.4.9 changelog and releasenotes 2018-11-02 11:28:57 -04:00

Tor protects your privacy on the internet by hiding the connection
between your Internet address and the services you use. We believe Tor
is reasonably secure, but please ensure you read the instructions and
configure it properly.

To build Tor from source:
        ./configure && make && make install

To build Tor from a just-cloned git repository:
        sh autogen.sh && ./configure && make && make install

Home page:
        https://www.torproject.org/

Download new versions:
        https://www.torproject.org/download/download.html

Documentation, including links to installation and setup instructions:
        https://www.torproject.org/docs/documentation.html

Making applications work with Tor:
        https://wiki.torproject.org/projects/tor/wiki/doc/TorifyHOWTO

Frequently Asked Questions:
        https://www.torproject.org/docs/faq.html


To get started working on Tor development:
        See the doc/HACKING directory.

Release timeline:
         https://trac.torproject.org/projects/tor/wiki/org/teams/NetworkTeam/CoreTorReleases