Bug 381956 - "xpcshell doesn't exit after closing browser window when running Mochitest" [p=sylvain.pasche@gmail.com (Sylvain Pasche) r+a1.9=sayrer]

This commit is contained in:
reed@reedloden.com 2008-02-20 02:07:04 -08:00
parent b10bfe7502
commit 76545ef748

View File

@ -364,10 +364,9 @@ sub startServer {
if ($pid == 0) {
# Run the server
my $status = 0;
my $command = "";
if ($close_when_done) {
$command .= "CLOSE_WHEN_DONE=1 ";
$ENV{'CLOSE_WHEN_DONE'} = '1';
}
if ($unixish) {
@ -375,18 +374,18 @@ sub startServer {
$ENV{'MOZILLA_FIVE_HOME'} = $dist_bin;
}
$command .= "$dist_bin/xpcshell -v 170 ";
my @runargs = ("$dist_bin/xpcshell", "-v", "170");
# this path is passed as a string, so we need to convert it on win32
if ($is_win32) {
$command .= " -f \"" . winPathFromDir($FindBin::Bin) . "\\httpd.js\"";
$command .= " -f \"" . winPathFromDir($FindBin::Bin) . "\\server.js\"";
push(@runargs, "-f", winPathFromDir($FindBin::Bin) . "\\httpd.js");
push(@runargs, "-f", winPathFromDir($FindBin::Bin) . "\\server.js");
} else {
$command .= " -f \"" . $FindBin::Bin . "/httpd.js\"";
$command .= " -f \"" . $FindBin::Bin . "/server.js\"";
push(@runargs, "-f", $FindBin::Bin . "/httpd.js");
push(@runargs, "-f", $FindBin::Bin . "/server.js");
}
print "$command\n";
exec("$command") or die("Error running server: $!\n");
print "@runargs\n";
exec @runargs or die("Error running server: $!\n");
}
return ($pid);