diff options
author | EW <bofh@yhbt.net> | 2023-06-06 10:09:25 +0000 |
---|---|---|
committer | EW <bofh@yhbt.net> | 2023-06-20 10:38:47 +0000 |
commit | bd8289c824905d57316e9d9eb469267bc406b0ed (patch) | |
tree | 18a29b32deea288f0eec04e9d5a2e6399e83981b | |
parent | f594a1dedbcd34457f490131909ccf7f2eb73c85 (diff) | |
download | unicorn-bd8289c824905d57316e9d9eb469267bc406b0ed.tar.gz |
Unfortunately, we need a sleep loop here since kill(2) succeeds on zombies and init(8) doesn't reap the worker soon enough on a FreeBSD VM.
-rw-r--r-- | t/active-unix-socket.t | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/active-unix-socket.t b/t/active-unix-socket.t index 4e11837..4dcc8dc 100644 --- a/t/active-unix-socket.t +++ b/t/active-unix-socket.t @@ -84,6 +84,10 @@ is($pidf, $to_kill{u1}, 'pid file contents unchanged after 2nd start failure'); ok(-S $u1, 'socket stayed after SIGKILL'); is(IO::Socket::UNIX->new(Peer => $u1, Type => SOCK_STREAM), undef, 'fail to connect to u1'); + for (1..50) { # wait for init process to reap worker + kill(0, $worker_pid) or last; + select(undef, undef, undef, 0.011); + } ok(!kill(0, $worker_pid), 'worker gone after parent dies'); } |