class ParallelTests::CLI

def handle_interrupt

def handle_interrupt
  @graceful_shutdown_attempted ||= false
  Kernel.exit if @graceful_shutdown_attempted
  # The Pid class's synchronize method can't be called directly from a trap
  # Using Thread workaround https://github.com/ddollar/foreman/issues/332
  Thread.new { ParallelTests.stop_all_processes }
  @graceful_shutdown_attempted = true
end