Sha256: 462f3453366638e2e613b540dca2d2396c7ee53cee381d33a59457edfafd931b

Contents?: true

Size: 484 Bytes

Versions: 41

Compression:

Stored size: 484 Bytes

Contents

# frozen_string_literal: true

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

require 'bundler/setup'
require 'polyphony'

Thread.backend.trace_proc = proc { |*e| STDOUT.orig_write("#{e.inspect}\n") }
trap('SIGINT') { STDOUT.orig_write("* recv SIGINT\n") }
# trap('SIGCHLD') { STDOUT.orig_write("* recv SIGCHLD\n") }
STDOUT.orig_write("* pre gets\n")
# STDIN.wait_readable
s = gets
p s
STDOUT.orig_write("* post gets\n")

Version data entries

41 entries across 41 versions & 1 rubygems

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