bcd: gracefully handle race condition in sigwait usage.
bcd: gracefully handle race condition in sigwait usage.

A larger refactor is warranted here to properly use signal masks. There
are several situations in which the signal handlers would be invoked.
This patch mitigates this in an isolated fashion.

This also fixes misuse with waitpid with a return value of 0 which can
result in missed signals due to early failure of the vfork child.

backtrace-labs/bcd