3 require 'sleepy_penguin'
5 class TestSignalFD < Test::Unit::TestCase
13 @sfd.close if @sfd && ! @sfd.closed?
17 @sfd = SignalFD.new(%w(USR1), 0)
18 pid = fork { sleep 0.01; Process.kill(:USR1, Process.ppid) }
20 assert_equal Signal.list["USR1"], siginfo.signo
21 assert_equal pid, siginfo.pid
22 assert Process.waitpid2(pid)[1].success?
24 end if RUBY_VERSION =~ %r{\A1\.9} && defined?(SleepyPenguin::SignalFD)