Tested FreeBSD 11.2. I'm starting to think I'm too conservative
with this check and it could be safely expanded to cover any OS
with UNIX sockets.
check_sock($unix);
{ # do not clobber existing socket
- my %err = ( 'linux' => EADDRINUSE );
+ my %err = ( 'linux' => EADDRINUSE, 'freebsd' => EADDRINUSE );
open my $out, '>>', "$tmpdir/1" or die "redirect failed: $!";
open my $err, '>>', "$tmpdir/2" or die "redirect failed: $!";
my $cmd = ['-httpd', '-l', $unix, '-W0', $psgi];