Closed miyagawa closed 11 years ago
serialize
Determines whether the server serializes child connections.
Options are undef, flock, semaphore, pipe, or none. Default is
undef. On multi_port servers or on servers running on Solaris, the
default is flock. The flock option uses blocking exclusive flock
on the file specified in lock_file (see below). [...] An
option of none will not perform any serialization. If "none" is
passed and there are multiple ports then a the default
serialization will be used insted of "none."
the documentation is kind of vague, but i guess even if you pass 'none', if there're multiple listen ports, flock is used anyway?
Net::Server::PreforkSimple will choose flock if multi_port and serialize eq 'none'
Net/Server/PreforkSimple.pm line 70
if ($prop->{'multi_port'} && $prop->{'serialize'} && $prop->{'serialize'} eq 'none') {
$self->log(2, "Passed serialize value of none is incompatible with multiple ports - using default serialize");
delete $prop->{'serialize'};
}
if (!$prop->{'serialize'}
|| $prop->{'serialize'} !~ /^(flock|semaphore|pipe|none)$/i) {
$prop->{'serialize'} = ($^O eq 'MSWin32') ? 'pipe' : 'flock';
}
OK, so is this safe to merge?
Warning displayed , but It's safe
I am not sure if it's safe to do unserialized accept(2) when there're multiple listen address/ports. c.f. http://d.hatena.ne.jp/naoya/20070311/1173629378
cc @kazeburo