We need to be able to successfully connect() to the socket
before attempting further tests. Merely testing for the
existence of a socket isn't enough, since the server may've
only done bind(), not listen().
ok(!-S $unix, 'UNIX socket does not exist, yet');
$spawn_httpd->("-l$unix");
+my %o = (Peer => $unix, Type => SOCK_STREAM);
for (1..1000) {
- last if -S $unix;
+ last if -S $unix && IO::Socket::UNIX->new(%o);
select undef, undef, undef, 0.02
}