From 73e1ce827faad59bfcaff0bc758c8255a5e4f747 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 28 Feb 2017 23:00:25 +0000 Subject: t0011-active-unix-socket.sh: fix race condition in test Killing the master process may lead to the worker dying on its own (as designed); before kill(1) has had an opportunity to send the second kill(2) syscall on the worker process. Killing the worker before the master might also lead to a needless respawn, so merely kill the master and let the worker follow it in death. This race condition occasionally caused test failures on slow, uniprocessor hardware. --- t/t0011-active-unix-socket.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t0011-active-unix-socket.sh b/t/t0011-active-unix-socket.sh index d256f5c..fae0b6c 100755 --- a/t/t0011-active-unix-socket.sh +++ b/t/t0011-active-unix-socket.sh @@ -52,7 +52,7 @@ t_begin "worker pid unchanged (again)" && { } t_begin "nuking the existing Unicorn succeeds" && { - kill -9 $unicorn_pid $worker_pid + kill -9 $unicorn_pid while kill -0 $unicorn_pid do sleep 1 -- cgit v1.2.3-24-ge0c7