incidentd: fix race in waitpid_with_timeout

waitpid_with_timeout has a race between a child process exiting and
the signal being blocked. Add an early waitpid to detect a child that
exited quickly.

Test: TH
Bug: 215574756
Change-Id: I6c7e9998d5b848c6144769f218fbcd7a0ee154bf
(cherry picked from commit 1f3012d2235276348edda1f8a0564c223b7aff8e)
1 file changed