Date | Commit message (Collapse) |
|
After this fix, all tests except test_client_expire are
passing on my system (macos 10.12.6). Honestly, I don't
really care if it's working perfectly fine. It's just
nice to be able to run the same server on development
machine. Production is of course Linux.
|
|
We can't require 'proxy_pass' in both a parent and forked child,
so require it up front (as kcar will become a hard dependency
in place of unicorn).
Then, rely on GTL (global test lock) to synchronize around fork
since the VM may not always be able to protect that.
However, there's no need to synchronize around
spawn/system/`backtick`, as the VM should always be using those
in a thread-safe way (via vfork).
|
|
Since the common case is still to run a single app inside yahns,
we can simplify setup a bit for systemd (and like) users by
allowing them to omit the "listen" directive when they are
running a single app in yahns.
|
|
It's possible to have "ruby" executables by other names
(e.g. "ruby24"), so use a supported API for finding our
executable.
This feature was added in Ruby 1.9.2, so it's safe to use
as we've always been 1.9.3+ (and nowadays 2.0+)
|
|
On FreeBSD 10.3 (and presumably other *BSD TCP stacks, the value
of SO_KEEPALIVE returned by getsockopt is 8, even when set to
'1' via setsockopt. Relax the test to only ensure the boolean
value is interpreted as "true".
Verified independently of Ruby using the following:
--------8<---------
#include <sys/types.h>
#include <sys/socket.h>
#include <stdio.h>
static int err(const char *msg)
{
perror(msg);
return 1;
}
int main(void)
{
int sv[2];
int set = 1;
int got;
socklen_t len = (socklen_t) sizeof(int);
int rc;
rc = socketpair(PF_LOCAL, SOCK_STREAM, 0, sv);
if (rc)
return err("socketpair failed");
rc = setsockopt(sv[0], SOL_SOCKET, SO_KEEPALIVE, &set, len);
if (rc)
return err("setsockopt failed");
rc = getsockopt(sv[0], SOL_SOCKET, SO_KEEPALIVE, &got, &len);
if (rc)
return err("getsockopt failed");
printf("got: %d\n", got);
return 0;
}
|
|
We should not infinite loop, oops :x
Also, ensure 'yahns' is in the directory in case tests are
SIGKILL-ed and directories are left over.
|
|
Using the 'update-copyright' script from gnulib[1]:
git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \
UPDATE_COPYRIGHT_USE_INTERVALS=2 \
xargs /path/to/gnulib/build-aux/update-copyright
We're also switching to 'GPL-3.0+' as recommended by SPDX
to be consistent with our gemspec and other metadata
(as opposed to the longer but equivalent "GPLv3 or later").
[1] git://git.savannah.gnu.org/gnulib.git
|
|
There are likely yet-to-be-discovered bugs in here.
Also, keeping explicit #freeze calls for 2.2 users, since most
users have not migrated to 2.3, yet.
|
|
Future updates may use the update-copyright script in gnulib:
git ls-files | UPDATE_COPYRIGHT_HOLDER='all contributors' \
UPDATE_COPYRIGHT_USE_INTERVALS=2 \
xargs /path/to/gnulib/build-aux/update-copyright
|
|
systemd socket emulation shares FDs across execve, just like
the built-in SIGUSR2 upgrade process in unicorn. Thus it is
easy to support inheriting sockets from systemd.
|
|
We need to prevent FD leakage on Ruby 1.9.3
|
|
We should see the reason for test failures.
|
|
close/FD_CLOEXEC may be insufficient since the socket could be
released asynchronously, leading to occasional test failures.
Even with a synchronous close/FD_CLOEXEC, there's a chance of a
race because the server does not bind the socket right away.
|
|
|
|
Temporarily disabling parallel tests maybe needed to diagnose
some problems with tests.
|
|
|
|
We can just add it into the SIGUSR2 test for now.
|
|
We no longer have to worry about 1.8 compatibility, so use
Process.spawn and shorten our code. Also, add tests for this
functionality.
|
|
This should help prevent us from running out of FDs prematurely
as our test suite becomes more multi-threaded. We can also use
plain TCPSocket in tests where we inherit the file descriptor
from the parent (w/o accept).
|
|
|