The text a38c5327fb0e, as Debian 12 (Bookworm) shipped it.
wait for process to change state, BSD style
wait3(2) on Linux now