Net-Respite
view release on metacpan or search on metacpan
lib/Net/Respite/Server/Test.pm view on Meta::CPAN
});
};
#debug $client;
###----------------------------------------------------------------###
# start the server in a child, block the parent until ready
my $pid = fork;
die "Could not fork during test\n" if ! defined $pid;
if (!$pid) { # child
local @ARGV;
$server->run_server(setsid => 0, background => 0); # allow a kill term to close the server too
exit;
}
my $client_pid = $$;
$client->{'_test_ender'} = end {
diag("Client object ending: pid=[$$] port=[$port]");
if ($client_pid != $$) {
diag("ORIGPID[$client_pid]!=CURRPID[$$] Refusing to stop server on port [$port]! Running setup_test_server() while an old client object still exists can trigger this phantom cleanup on the OLD client object when the child request from the...
( run in 0.546 second using v1.01-cache-2.11-cpan-beeb90c9504 )