Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
tor-browser-bundle-testsuite
Commits
224edf37
Unverified
Commit
224edf37
authored
Dec 01, 2014
by
boklm
Browse files
tor_bootstrap: convert cygwin pid to windows pid
parent
9a072d74
Changes
1
Show whitespace changes
Inline
Side-by-side
TBBTestSuite/Tests/TorBootstrap.pm
View file @
224edf37
package
TBBTestSuite::Tests::
TorBootstrap
;
package
TBBTestSuite::Tests::
TorBootstrap
;
use
strict
;
use
strict
;
use
English
;
use
File::
Slurp
;
use
File::
Slurp
;
use
Cwd
qw(getcwd)
;
use
Cwd
qw(getcwd)
;
use
TBBTestSuite::
Common
qw(exit_error winpath has_bin)
;
use
TBBTestSuite::
Common
qw(exit_error winpath has_bin)
;
...
@@ -27,6 +28,10 @@ END {
...
@@ -27,6 +28,10 @@ END {
stop_httpproxy
;
stop_httpproxy
;
}
}
sub
winpid
{
$OSNAME
eq
'
cygwin
'
?
Cygwin::
pid_to_winpid
(
$_
[
0
])
:
$_
[
0
];
}
sub
monitor_bootstrap
{
sub
monitor_bootstrap
{
my
(
$tbbinfos
,
$test
,
$control_passwd
)
=
@_
;
my
(
$tbbinfos
,
$test
,
$control_passwd
)
=
@_
;
sleep
10
;
sleep
10
;
...
@@ -132,7 +137,7 @@ sub start_tor {
...
@@ -132,7 +137,7 @@ sub start_tor {
'
-f
',
winpath
("
$tbbinfos
->{datadir}/Tor/torrc
"),
'
-f
',
winpath
("
$tbbinfos
->{datadir}/Tor/torrc
"),
'
DataDirectory
',
winpath
("
$tbbinfos
->{datadir}/Tor
"),
'
DataDirectory
',
winpath
("
$tbbinfos
->{datadir}/Tor
"),
'
GeoIPFile
',
winpath
("
$tbbinfos
->{datadir}/Tor/geoip
"),
'
GeoIPFile
',
winpath
("
$tbbinfos
->{datadir}/Tor/geoip
"),
'
__OwningControllerProcess
',
$$
);
'
__OwningControllerProcess
',
winpid
(
$$
)
)
;
$tbbinfos
->
{
torpid
}
=
fork
;
$tbbinfos
->
{
torpid
}
=
fork
;
if
(
$tbbinfos
->
{
torpid
}
==
0
)
{
if
(
$tbbinfos
->
{
torpid
}
==
0
)
{
$ENV
{
LD_LIBRARY_PATH
}
=
"
$tbbinfos
->{tbbdir}:
$tbbinfos
->{tordir}
";
$ENV
{
LD_LIBRARY_PATH
}
=
"
$tbbinfos
->{tbbdir}:
$tbbinfos
->{tordir}
";
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment