Skip to content

Commit

Permalink
Merge pull request #196 from YusukeIwaki/fix-sigint-handling
Browse files Browse the repository at this point in the history
Prevent SIGINT to be passed into Chrome
  • Loading branch information
Yusuke Iwaki authored Feb 1, 2022
2 parents d4905d7 + 2ed9160 commit f880d18
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/puppeteer/browser_runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ def initialize(env, executable_path, args)
[executable_path]
end

stdin, @stdout, @stderr, @thread = Open3.popen3(env, executable_path, *args)
popen3_args = args || []
popen3_args << { pgroup: true } unless Puppeteer.env.windows?
stdin, @stdout, @stderr, @thread = Open3.popen3(env, executable_path, *popen3_args)
stdin.close
@pid = @thread.pid
rescue Errno::ENOENT => err
Expand Down

0 comments on commit f880d18

Please sign in to comment.