Project

General

Profile

Bug #960

SIGINT signal is not handled properly on OpenSolaris

Added by daesan (Dae San Hwang) over 11 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Target version:
ruby -v:
Backport:
[ruby-core:21021]

Description

=begin
Following test failed.. (http://ruby.peppercode.com/log/ruby-1.9.1/last.txt )

test_should_propagate_signaled(TestBeginEndBlock) [/usr/local/src/ruby-1.9.1-rc1/test/ruby/test_beginendblock.rb:96]

It seems that a ruby loop doesn't get interrupted by 'Ctrl-C' on OpenSolaris.
=end

#1

Updated by yugui (Yuki Sonoda) over 11 years ago

  • Target version changed from 1.9.1 Release Candidate to 1.9.1 RC2

=begin

=end

#2

Updated by mame (Yusuke Endoh) over 11 years ago

=begin
Hi,

Following test failed.. (http://ruby.peppercode.com/log/ruby-1.9.1/last.txt )

test_should_propagate_signaled(TestBeginEndBlock) [/usr/local/src/ruby-1.9.1-rc1/test/ruby/test_beginendblock.rb:96]

It seems that a ruby loop doesn't get interrupted by 'Ctrl-C' on OpenSolaris.

I think the following patch will fix this issue. Could you try it?

Index: process.c
===================================================================
--- process.c (revision 21266)
+++ process.c (working copy)
@@ -2736,12 +2736,8 @@
}

-#if defined(sun)
-#define signal(a,b) sigset(a,b)
-#else
-# if defined(POSIX_SIGNAL)
-# define signal(a,b) posix_signal(a,b)
-# endif
+#if defined(POSIX_SIGNAL)
+# define signal(a,b) posix_signal(a,b)
#endif

void

--
Yusuke ENDOH mame@tsg.ne.jp
=end

#3

Updated by daesan (Dae San Hwang) over 11 years ago

=begin
Hi Yusuke,

Your patch indeed solves the problem.

It fixed two other process related test failures as well. Thanks a lot!

daesan

I think the following patch will fix this issue. Could you try it?

Index: process.c

--- process.c (revision 21266)
+++ process.c (working copy)
@@ -2736,12 +2736,8 @@
}

-#if defined(sun)
-#define signal(a,b) sigset(a,b)
-#else
-# if defined(POSIX_SIGNAL)
-# define signal(a,b) posix_signal(a,b)
-# endif
+#if defined(POSIX_SIGNAL)
+# define signal(a,b) posix_signal(a,b)
#endif

void

=end

#4

Updated by mame (Yusuke Endoh) over 11 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
Applied in changeset r21275.
=end

#5

Updated by daesan (Dae San Hwang) over 11 years ago

=begin
Hi Yusuke,

Can you apply this patch to 1.9.1 branch as well? Thanks!

daesan
=end

#6

Updated by shyouhei (Shyouhei Urabe) over 11 years ago

  • Assignee set to yugui (Yuki Sonoda)

=begin

=end

Also available in: Atom PDF