The text ec0aaa2a8ff4, as Debian 7 (Wheezy) shipped it.
wait for process to change state, BSD style
wait3(2) on Linux now