From f020550fc802f299fdcdec695ac80d53ef3d24d9 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 2 Jul 2012 04:21:40 +0000 Subject: test workaround for platforms with unreliable signals 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 file 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 -- cgit v1.2.3-24-ge0c7