Sha256: 7859a88b5fed323c58a190dca71b1a1828adcacc296f611ecbdb03505b9eed90
Contents?: true
Size: 241 Bytes
Versions: 2
Compression:
Stored size: 241 Bytes
Contents
# frozen_string_literal: true require_relative '../lib/tty-command' cmd = TTY::Command.new begin cmd.run("while test 1; do echo 'hello'; sleep 1; done", timeout: 5, signal: :KILL) rescue TTY::Command::TimeoutExceeded puts 'BOOM!' end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tty-command-0.9.0 | examples/timeout.rb |
tty-command-0.8.2 | examples/timeout.rb |