# File lib/brakeman/report/pager.rb, line 51
    def page_via_less text
      # Adapted from https://github.com/piotrmurach/tty-pager/

      write_io = open("|less #{less_options.join}", 'w')
      pid = write_io.pid

      write_io.write(text)
      write_io.close

      Process.waitpid2(pid, Process::WNOHANG)
    rescue Errno::ECHILD
      # on jruby 9x waiting on pid raises (per tty-pager)
      true
    rescue => e
      warn "[Error] #{e}"
      warn "[Error] Could not use pager. Set --no-pager to avoid this issue."
      no_pager text
    end