On a slow emulated (uniprocessor) system it can happen that the SIGUSR1
signal is sent before the child process has registered the SIGUSR1 handler.
In that case the waitpid status will show that the child was killed by
a signal and the test fails.
To avoid this race use a pipe to ensure that the SIGUSR1 handler has been
registered before continuing execution in the parent.
This also slightly speeds up the test by avoiding the sleep(1).
On a slow emulated (uniprocessor) system it can happen that the SIGUSR1 signal is sent before the child process has registered the SIGUSR1 handler. In that case the waitpid status will show that the child was killed by a signal and the test fails. To avoid this race use a pipe to ensure that the SIGUSR1 handler has been registered before continuing execution in the parent. This also slightly speeds up the test by avoiding the sleep(1).