[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
aroben at apple.com
aroben at apple.com
Wed Dec 22 11:11:31 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit aa253d27c6c3395be70bc2b71817f10b71c9a25a
Author: aroben at apple.com <aroben at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Jul 14 21:28:20 2010 +0000
Speed up killing of Apache on Windows
Fixes <http://webkit.org/b/42289> Killing Apache (and thus quitting
run-webkit-tests) takes a long time on Windows
Reviewed by Darin Adler and Jon Honeycutt.
* Scripts/webkitperl/httpd.pm:
(closeHTTPD): Use taskkill to kill Apache and its child processes.
Perl's kill seems ineffectual. We were already using taskkill, but
only after trying kill 20 times. Since kill never works, let's just
skip it entirely.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63355 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index c693302..0c6af99 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,18 @@
+2010-07-14 Adam Roben <aroben at apple.com>
+
+ Speed up killing of Apache on Windows
+
+ Fixes <http://webkit.org/b/42289> Killing Apache (and thus quitting
+ run-webkit-tests) takes a long time on Windows
+
+ Reviewed by Darin Adler and Jon Honeycutt.
+
+ * Scripts/webkitperl/httpd.pm:
+ (closeHTTPD): Use taskkill to kill Apache and its child processes.
+ Perl's kill seems ineffectual. We were already using taskkill, but
+ only after trying kill 20 times. Since kill never works, let's just
+ skip it entirely.
+
2010-07-14 Johnny Ding <jnd at chromium.org>
Reviewed by Adam Barth.
diff --git a/WebKitTools/Scripts/webkitperl/httpd.pm b/WebKitTools/Scripts/webkitperl/httpd.pm
index 443a37b..b30aa39 100644
--- a/WebKitTools/Scripts/webkitperl/httpd.pm
+++ b/WebKitTools/Scripts/webkitperl/httpd.pm
@@ -198,7 +198,20 @@ sub closeHTTPD
close HTTPDIN;
my $retryCount = 20;
if ($httpdPid) {
- kill 15, $httpdPid;
+ if (isCygwin()) {
+ # Kill the process (and all its child processes) using taskkill, as
+ # perl's kill doesn't seem to work with Apache. A return value of 0
+ # means the process was killed, and return value of 32768 means
+ # there was no process with that PID. We use open/close here
+ # instead of system to avoid having taskkill print to stdout.
+ if (open(TASKKILL, "-|", qw(taskkill /f /t /pid), $httpdPid) && close(TASKKILL) && (!$? || $? == 32768)) {
+ # Cygwin's Apache doesn't delete the PID file itself when
+ # killed. We delete the PID file for it to work around this.
+ unlink $httpdPidFile;
+ }
+ } else {
+ kill 15, $httpdPid;
+ }
while (-f $httpdPidFile && $retryCount) {
sleep 1;
--$retryCount;
@@ -206,13 +219,6 @@ sub closeHTTPD
}
cleanUp();
if (!$retryCount) {
- if (isCygwin()) {
- my $result = system("taskkill /f /im httpd.exe");
- # taskkill returning 0 means a successful kill, and 32768 means that no process matching
- # the name was found. For either of these cases, the process has been successfully killed.
- return 1 if $result == 0 || $result == 32768;
- return 0;
- }
print STDERR "Timed out waiting for httpd to terminate!\n";
return 0;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list