Sha256: c6265895d99f6b06add1cf1f25a90074dda990d2b1ca36b17cc8f0ecae6caa9b

Contents?: true

Size: 205 Bytes

Versions: 41

Compression:

Stored size: 205 Bytes

Contents

# frozen_string_literal: true

pid = Process.pid
fork do
  sleep 1
  Process.kill('SIGINT', pid)
  # sleep 10
  # Process.kill(-9, pid)
end

trap('SIGINT') {}
p :before
result = IO.select([STDIN])
p :after

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
polyphony-1.6 examples/core/trap2.rb
polyphony-1.5 examples/core/trap2.rb
polyphony-1.4 examples/core/trap2.rb
polyphony-1.3 examples/core/trap2.rb
polyphony-1.2.1 examples/core/trap2.rb
polyphony-1.2 examples/core/trap2.rb
polyphony-1.1.1 examples/core/trap2.rb
polyphony-1.1 examples/core/trap2.rb
polyphony-1.0.2 examples/core/trap2.rb
polyphony-1.0.1 examples/core/trap2.rb
polyphony-1.0 examples/core/trap2.rb
polyphony-0.99.6 examples/core/trap2.rb
polyphony-0.99.5 examples/core/trap2.rb
polyphony-0.99.4 examples/core/trap2.rb
polyphony-0.99.3 examples/core/trap2.rb
polyphony-0.99.2 examples/core/trap2.rb
polyphony-0.99.1 examples/core/trap2.rb
polyphony-0.99 examples/core/trap2.rb
polyphony-0.98 examples/core/trap2.rb
polyphony-0.97 examples/core/trap2.rb