Unverified Commit 224edf37 authored by boklm's avatar boklm
Browse files

tor_bootstrap: convert cygwin pid to windows pid

parent 9a072d74
package TBBTestSuite::Tests::TorBootstrap;
use strict;
use English;
use File::Slurp;
use Cwd qw(getcwd);
use TBBTestSuite::Common qw(exit_error winpath has_bin);
......@@ -27,6 +28,10 @@ END {
stop_httpproxy;
}
sub winpid {
$OSNAME eq 'cygwin' ? Cygwin::pid_to_winpid($_[0]) : $_[0];
}
sub monitor_bootstrap {
my ($tbbinfos, $test, $control_passwd) = @_;
sleep 10;
......@@ -132,7 +137,7 @@ sub start_tor {
'-f', winpath("$tbbinfos->{datadir}/Tor/torrc"),
'DataDirectory', winpath("$tbbinfos->{datadir}/Tor"),
'GeoIPFile', winpath("$tbbinfos->{datadir}/Tor/geoip"),
'__OwningControllerProcess', $$);
'__OwningControllerProcess', winpid($$));
$tbbinfos->{torpid} = fork;
if ($tbbinfos->{torpid} == 0) {
$ENV{LD_LIBRARY_PATH} = "$tbbinfos->{tbbdir}:$tbbinfos->{tordir}";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment