Merge branch 'sg/fast-import-dump-refs-on-checkpoint-fix'
[gitweb.git] / t / t9300-fast-import.sh
index 9e7f96223dc2222c48b172711b4b469ff08190c8..fac33e524c760c5dedc908c02e2efc185eeed92a 100755 (executable)
@@ -3147,7 +3147,10 @@ background_import_then_checkpoint () {
        echo $! >V.pid
        # We don't mind if fast-import has already died by the time the test
        # ends.
-       test_when_finished "exec 8>&-; exec 9>&-; kill $(cat V.pid) || true"
+       test_when_finished "
+               exec 8>&-; exec 9>&-;
+               kill $(cat V.pid) && wait $(cat V.pid)
+               true"
 
        # Start in the background to ensure we adhere strictly to (blocking)
        # pipes writing sequence. We want to assume that the write below could