daemon(8): handle case of waitpid() returning without exited child
Not checking for either WIFEXITED(status) or zero result results in
never finishing the loop.
PR: 277764
Reviewed by: kevans (previous version)
Discussed with: Daniel Tameling
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D44401