diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-03-27 00:20:24 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-03-27 00:26:01 -0700 |
commit | 72ed1ceba5dbfe3656480af22740118b9e06d418 (patch) | |
tree | 0a80fe712db8427cb6a022f63f797a34fdad222e /test/exec/test_exec.rb | |
parent | 0057c878003b41efb3a53529409f16f9073f0934 (diff) | |
download | unicorn-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/exec/test_exec.rb')
-rw-r--r-- | test/exec/test_exec.rb | 2 |
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 |