We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8787787 commit 1f25a8fCopy full SHA for 1f25a8f
lib/ferrum/browser/process.rb
@@ -34,7 +34,8 @@ def self.process_killer(pid)
34
proc do
35
begin
36
if Ferrum.windows?
37
- ::Process.kill("KILL", pid)
+ # Process.kill is unreliable on Windows
38
+ ::Process.kill("KILL", pid) unless system("taskkill /f /t /pid #{pid} >NUL 2>NUL")
39
else
40
::Process.kill("USR1", pid)
41
start = Ferrum.monotonic_time
@@ -88,7 +89,7 @@ def start
88
89
@xvfb = Xvfb.start(@command.options)
90
ObjectSpace.define_finalizer(self, self.class.process_killer(@xvfb.pid))
91
end
-
92
+
93
@pid = ::Process.spawn(Hash(@xvfb&.to_env), *@command.to_a, process_options)
94
ObjectSpace.define_finalizer(self, self.class.process_killer(@pid))
95
0 commit comments