Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle case where
stashed_signals_blocking_more_signals
is true and…
… we need to deliver a `TIME_SLICE_SIGNAL` to kick the tracee task out of a wait The `vfork_done` test was failing itermittently. The grandchild would exit, causing us to try to deliver a synthetic `SIGCHLD` to the main process during its `waitpid()`. We'd stash that SIGCHLD according to the logic in `set_siginfo_for_synthetic_SIGCHLD()` and the main process would resume waiting since it's waiting on its immediate child. This would trigger `stashed_signals_blocking_more_signals`. Then the `vfork()` would finish and we'd do another `set_siginfo_for_synthetic_SIGCHLD()` `PTRACE_EVENT_VFORK_DONE` event. `is_sig_blocked(SIGCHLD)` is false but we actually are blocking `SIGCHLD` due to `stashed_signals_blocking_more_signals`, so we would not send any signal and the main process would remain stuck in its `waitpid()`. When `stashed_signals_blocking_more_signals` is true we need to send the extra `TIME_SLICE_SIGNAL` to ensure the main process is kicked out of its wait.
- Loading branch information