chg: do another waitpid() after nanosleep() succeeded
(cherry picked from commit 9d9a7faa6bb7522c1db8caabc4c47c0aa0840caf)

Signed-off-by: Andreas Steenpass <steenpass@mathematik.uni-kl.de>
Merge pull request #435 from steenpass/waitpid_sw

chg: do another waitpid() after nanosleep() succeeded