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:
parent
9f84f31b8f
commit
9ac628841c
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue