Permalink
Browse files

Use only IO.popen for spawning webkit_server, it already closes unnec…

…essary file descriptors.

Fixes issue #137.
  • Loading branch information...
FooBarWidget committed Aug 19, 2011
1 parent 37f5c55 commit fe13b0b985f1c656156bdaf888bced9a605eb305
Showing with 1 addition and 9 deletions.
  1. +1 −9 lib/capybara/driver/webkit/browser.rb
@@ -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)

0 comments on commit fe13b0b

Please sign in to comment.