local $quit = sub {
$exit_code //= shift;
my $listener = $l or exit($exit_code);
- unlink($path) if defined($path);
# closing eof_w triggers \&noop wakeup
$eof_w = $l = $path = undef;
$listener->close; # DS::close
kill(0, $pid) or last;
tick();
}
- ok(!-S $sock, 'sock gone');
+ ok(-S $sock, 'sock still exists');
ok(!kill(0, $pid), 'pid gone after stop');
ok($lei->(qw(daemon-pid)), 'daemon-pid');
chomp(my $new_pid = $out);
ok(kill(0, $new_pid), 'new pid is running');
- ok(-S $sock, 'sock exists again');
+ ok(-S $sock, 'sock still exists');
for my $sig (qw(-0 -CHLD)) {
ok($lei->('daemon-kill', $sig), "handles $sig");