about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-07-21 21:37:44 +0000
committerEric Wong <e@80x24.org>2015-07-21 21:37:44 +0000
commit47bd67cf08b6041e1868b69e1a54593c22a5a0a3 (patch)
tree926b0c712bb921a4eaa33dfacc6c814823122ad7 /test
parent6232929e4bcdca08344e9373f6cbf66fc4cecd0b (diff)
downloadyahns-47bd67cf08b6041e1868b69e1a54593c22a5a0a3.tar.gz
Process.spawn is faster under Linux since it may use vfork
to avoid marking pages copy-on-write.
Diffstat (limited to 'test')
-rw-r--r--test/test_client_expire.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/test_client_expire.rb b/test/test_client_expire.rb
index 4f20803..c23a727 100644
--- a/test/test_client_expire.rb
+++ b/test/test_client_expire.rb
@@ -125,9 +125,8 @@ class TestClientExpire < Testcase
     opts = { out: "/dev/null", err: "/dev/null", close_others: true }
     begin
       pids = 2.times.map do
-        fork do
-          exec(*%W(ab -c #{nr} -n 9999999 -v1 -k http://#{host}:#{port}/), opts)
-        end
+        Process.spawn(*%W(ab -c #{nr} -n 9999999 -v1 -k
+                          http://#{host}:#{port}/), opts)
       end
 
       re1 = %r{consider raising open file limits}