about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-03-27 00:20:24 -0700
committerEric Wong <normalperson@yhbt.net>2009-03-27 00:26:01 -0700
commit72ed1ceba5dbfe3656480af22740118b9e06d418 (patch)
tree0a80fe712db8427cb6a022f63f797a34fdad222e /test
parent0057c878003b41efb3a53529409f16f9073f0934 (diff)
downloadunicorn-72ed1ceba5dbfe3656480af22740118b9e06d418.tar.gz
Instead of rotating logs immediately when SIGUSR1 is caught,
defer it until the current client is processing is complete.

This allows multi-line log messages generated by apps to not be
broken up if SIGUSR1 is received while the app is running.

If we're sleeping inside IO.select, we close a pipe in the
exceptfds set to cause EBADF to be raised.

This also adds a small reliability improvement to test_exec
so we wait until signals are ready before sending USR1
to rotate logs.
Diffstat (limited to 'test')
-rw-r--r--test/exec/test_exec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/exec/test_exec.rb b/test/exec/test_exec.rb
index ea9fc7c..53cebf6 100644
--- a/test/exec/test_exec.rb
+++ b/test/exec/test_exec.rb
@@ -502,7 +502,7 @@ end
       lines = []
       while (tries -= 1) > 0
         begin
-          lines = File.readlines(path).grep(/worker=\d+ spawned/)
+          lines = File.readlines(path).grep(/worker=\d+ ready/)
           lines.size == nr_workers and return
         rescue Errno::ENOENT
         end