The text f22d52b184bd, as Debian 6.0 (Squeeze) shipped it.
wait for process to change state, BSD style
wait4(2) on Linux now