Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Use only IO.popen for spawning webkit_server, it already closes unnec…
Browse files Browse the repository at this point in the history
…essary file descriptors.

Fixes issue #137.
  • Loading branch information
FooBarWidget committed Aug 19, 2011
1 parent 37f5c55 commit fe13b0b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/capybara/driver/webkit/browser.rb
Expand Up @@ -109,15 +109,7 @@ def fork_server

def server_pipe_and_pid(server_path)
pipe = IO.popen(server_path)
if Process.respond_to?(:spawn)
[pipe, Process.spawn(server_path,
:in => :in,
:out => pipe,
:err => :err,
:close_others => true)]
else
[pipe, pipe.pid]
end
[pipe, pipe.pid]
end

def discover_server_port(read_pipe)
Expand Down

0 comments on commit fe13b0b

Please sign in to comment.