1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00

don't explode when the child process is already dead

This commit is contained in:
Jon Leighton 2012-02-29 18:15:28 +00:00
parent 9f84f31b8f
commit 9ac628841c

View file

@ -28,8 +28,13 @@ module Capybara::Poltergeist
def stop
if pid
Process.kill('TERM', pid)
Process.wait(pid)
begin
Process.kill('TERM', pid)
Process.wait(pid)
rescue Errno::ESRCH, Errno::ECHILD
# Zed's dead, baby
end
@pid = nil
end
end