From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS6939 64.71.128.0/18 X-Spam-Status: No, score=-2.0 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.kgio.general Subject: [PATCH 3/3] test workaround for platforms with unreliable signals Date: Wed, 11 Jul 2012 15:34:58 -0700 Message-ID: <1342046098-27952-4-git-send-email-normalperson@yhbt.net> References: <1342046098-27952-1-git-send-email-normalperson@yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1342046123 14983 80.91.229.3 (11 Jul 2012 22:35:23 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Jul 2012 22:35:23 +0000 (UTC) To: kgio@librelist.org Original-X-From: kgio@librelist.org Thu Jul 12 00:35:23 2012 Return-path: Envelope-to: gclrkg-kgio@m.gmane.org List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: kgio@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.kgio.general:176 Archived-At: Received: from zedshaw.xen.prgmr.com ([64.71.167.205]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sp5VC-0003YQ-C1 for gclrkg-kgio@m.gmane.org; Thu, 12 Jul 2012 00:35:22 +0200 Received: from zedshaw.xen.prgmr.com (localhost [IPv6:::1]) by zedshaw.xen.prgmr.com (Postfix) with ESMTP id 9FFD221E1D0 for ; Wed, 11 Jul 2012 22:44:13 +0000 (UTC) From: Eric Wong 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