about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-09-27 17:26:54 -0700
committerEric Wong <normalperson@yhbt.net>2009-09-27 17:26:54 -0700
commit0c3ec1aca5ad3b6f687ecdc75f193e2a0f0ae4a1 (patch)
tree0388638c82898d67799d2868daa48afffad92685 /test
parent9c00824720ec9be3b13ac8d66175e063c28885f0 (diff)
downloadunicorn-0c3ec1aca5ad3b6f687ecdc75f193e2a0f0ae4a1.tar.gz
We don't want to accidentally kill every process in the
process group.
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_signals.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/test_signals.rb b/test/unit/test_signals.rb
index 9e8ccd0..d409da3 100644
--- a/test/unit/test_signals.rb
+++ b/test/unit/test_signals.rb
@@ -141,6 +141,7 @@ class SignalsTest < Test::Unit::TestCase
       pid = buf[/\r\nX-Pid: (\d+)\r\n/, 1].to_i
       header_len = buf[/\A(.+?\r\n\r\n)/m, 1].size
     end
+    assert pid > 0, "pid not positive: #{pid.inspect}"
     read = buf.size
     mode_before = @tmp.stat.mode
     assert_raises(EOFError,Errno::ECONNRESET,Errno::EPIPE,Errno::EINVAL,
@@ -177,6 +178,7 @@ class SignalsTest < Test::Unit::TestCase
       sock.close
     end
 
+    assert pid > 0, "pid not positive: #{pid.inspect}"
     sock = TCPSocket.new('127.0.0.1', @port)
     sock.syswrite("PUT / HTTP/1.0\r\n")
     sock.syswrite("Content-Length: #{@bs * @count}\r\n\r\n")