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 02f7586 commit 23f0fc4Copy full SHA for 23f0fc4
lib/capybara/cuprite/driver.rb
@@ -330,7 +330,7 @@ def pause
330
# In jRuby - STDIN returns immediately from select
331
# see https://github.com/jruby/jruby/issues/1783
332
read, write = IO.pipe
333
- Thread.new { IO.copy_stream(STDIN, write); write.close }
+ thread = Thread.new { IO.copy_stream(STDIN, write); write.close }
334
335
STDERR.puts "Cuprite execution paused. Press enter (or run 'kill -CONT #{Process.pid}') to continue."
336
@@ -346,6 +346,8 @@ def pause
346
end
347
348
ensure
349
+ thread.kill
350
+ read.close
351
trap("SIGCONT", old_trap) # Restore the previous signal handler, if there was one.
352
STDERR.puts "Continuing"
353
0 commit comments