This backports a patch I committed upstream (I'm now a Ruby commiter), which fixes signal handling on OpenBSD. This allows us to remove a couple patches which skipped tests that used to hang, which I thought were related to the fifo pthread fdlock issue, but turned out to be due to the signal handling bug. It also fixes an annoying issue in irb, where Ctrl+C is ignored until another key is pressed.
This also removes another patch for skipping a thread test which hanged due to the fifo pthread fdlock issue, which is no longer necessary now that that issue has been fixed. This fix is only needed on Ruby 2.6, as the issue does not affect earlier Ruby versions. Tested on amd64. Will be committing in a couple days unless I hear objections. Thanks, Jeremy Index: Makefile =================================================================== RCS file: /cvs/ports/lang/ruby/2.6/Makefile,v retrieving revision 1.4 diff -u -p -r1.4 Makefile --- Makefile 26 Apr 2019 15:46:28 -0000 1.4 +++ Makefile 25 May 2019 17:30:04 -0000 @@ -5,6 +5,11 @@ DISTNAME = ruby-${VERSION} SHARED_LIBS = ruby26 0.0 NEXTVER = 2.7 +REVISION-main = 0 +MASTER_SITES0 = https://github.com/ruby/ruby/commit/ +PATCHFILES = 1ef39d8d099f145222b9352423af16a2bab6e05b.patch:0 +PATCH_DIST_STRIP = -p1 + PSEUDO_FLAVORS= no_ri_docs bootstrap # Do not build the RI docs on slow arches .if ${MACHINE_ARCH:Malpha} || ${MACHINE_ARCH:Marm} || ${MACHINE_ARCH:Mhppa} Index: distinfo =================================================================== RCS file: /cvs/ports/lang/ruby/2.6/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 26 Apr 2019 15:46:28 -0000 1.4 +++ distinfo 25 May 2019 17:30:04 -0000 @@ -1,2 +1,4 @@ +SHA256 (1ef39d8d099f145222b9352423af16a2bab6e05b.patch) = eiBIYlSeJXKklacgt8QHVE6arFAY9eCjWODxjNWBXVg= SHA256 (ruby-2.6.3.tar.gz) = V3/TeV8iuNkcHU5nM2N7A5TUCC22WfzPIkx3Siscgvs= +SIZE (1ef39d8d099f145222b9352423af16a2bab6e05b.patch) = 2584 SIZE (ruby-2.6.3.tar.gz) = 16784748 Index: patches/patch-test_ruby_test_process_rb =================================================================== RCS file: patches/patch-test_ruby_test_process_rb diff -N patches/patch-test_ruby_test_process_rb --- patches/patch-test_ruby_test_process_rb 14 Jan 2019 16:13:05 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,25 +0,0 @@ -$OpenBSD: patch-test_ruby_test_process_rb,v 1.1.1.1 2019/01/14 16:13:05 jeremy Exp $ - -Skip hanging tests, potentially due to fifo fd locking. - -Index: test/ruby/test_process.rb ---- test/ruby/test_process.rb.orig -+++ test/ruby/test_process.rb -@@ -672,7 +672,7 @@ class TestProcess < Test::Unit::TestCase - assert_equal("ok\n", io.read) - } - } -- end unless windows? # does not support fifo -+ end if false # fifo fdlock bug? - - def test_execopts_redirect_open_fifo_interrupt_print - with_tmpchdir {|d| -@@ -695,7 +695,7 @@ class TestProcess < Test::Unit::TestCase - assert_equal("ok\n", io.read) - } - } -- end unless windows? # does not support fifo -+ end if false # fifo fdlock bug? - - def test_execopts_redirect_pipe - with_pipe {|r1, w1| Index: patches/patch-test_ruby_test_thread_rb =================================================================== RCS file: patches/patch-test_ruby_test_thread_rb diff -N patches/patch-test_ruby_test_thread_rb --- patches/patch-test_ruby_test_thread_rb 14 Jan 2019 16:13:05 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,16 +0,0 @@ -$OpenBSD: patch-test_ruby_test_thread_rb,v 1.1.1.1 2019/01/14 16:13:05 jeremy Exp $ - -Skip hanging test. - -Index: test/ruby/test_thread.rb ---- test/ruby/test_thread.rb.orig -+++ test/ruby/test_thread.rb -@@ -976,7 +976,7 @@ _eom - [s.exited?, s.signaled?, s.stopped?, s.termsig], - "[s.exited?, s.signaled?, s.stopped?, s.termsig]") - assert_include(0..2, t, bug5757) -- end -+ end if false # possible fifo fdlock bug? - - def test_thread_join_in_trap - assert_separately [], <<-'EOS'