That's why your processes don't get stopped properly.....
Update: Tried it without the 'waitpid' and exactly as predicted left me with "ghost" processes which I had to kill manually...
Comment on Re^2: Start a service, wait 10 seconds, and stop the service.