kgio RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: kgio@librelist.org
Subject: [PATCH 3/3] test workaround for platforms with unreliable signals
Date: Wed, 11 Jul 2012 15:34:58 -0700	[thread overview]
Message-ID: <1342046098-27952-4-git-send-email-normalperson@yhbt.net> (raw)
In-Reply-To: 1342046098-27952-1-git-send-email-normalperson@yhbt.net

From: Eric Wong <ew@debkfreebsd.(none)>

Ruby may not respond well to signals on all platforms, especially not
after fork()-ing in the face of a running pthread (timer thread on
1.9.2).  SIGKILL bypasses Ruby (and all userspace) signal handling on
Debian GNU/kFreeBSD.
---
 test/lib_server_accept.rb |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/test/lib_server_accept.rb b/test/lib_server_accept.rb
index ccf89d8..ff0f733 100644
--- a/test/lib_server_accept.rb
+++ b/test/lib_server_accept.rb
@@ -47,7 +47,7 @@ module LibServerAccept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
     assert_equal @host, b.kgio_addr
-    Process.kill(:TERM, pid)
+    Process.kill(:KILL, pid)
     Process.waitpid(pid)
     assert elapsed >= 1, "elapsed: #{elapsed}"
   end
@@ -60,7 +60,7 @@ module LibServerAccept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
     assert_equal @host, b.kgio_addr
-    Process.kill(:TERM, pid)
+    Process.kill(:KILL, pid)
     Process.waitpid(pid)
     assert elapsed >= 1, "elapsed: #{elapsed}"
 
@@ -70,7 +70,7 @@ module LibServerAccept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
     assert_equal @host, b.kgio_addr
-    Process.kill(:TERM, pid)
+    Process.kill(:KILL, pid)
     Process.waitpid(pid)
     assert elapsed >= 6, "elapsed: #{elapsed}"
 
@@ -80,7 +80,7 @@ module LibServerAccept
     elapsed = Time.now - t0
     assert_kind_of Kgio::Socket, b
     assert_equal @host, b.kgio_addr
-    Process.kill(:TERM, pid)
+    Process.kill(:KILL, pid)
     Process.waitpid(pid)
     assert elapsed >= 1, "elapsed: #{elapsed}"
   end
-- 
1.7.2.5



      parent reply	other threads:[~2012-07-11 22:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-11 22:34 [PATCH 0/3] test fixes for GNU/kFreeBSD (and possibly other *BSDs) Eric Wong
2012-07-11 22:34 ` [PATCH 1/3] test_poll: skip signal torture on Debian GNU/kfreebsd Eric Wong
2012-07-11 22:34 ` [PATCH 2/3] test/lib_read_write: wait for readability before tryread Eric Wong
2012-07-11 22:34 ` Eric Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/kgio/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342046098-27952-4-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=kgio@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/kgio.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).