Hi Henson, Thanks for the careful read.
Both timeouts can be set in a single SIGALRM, since handle_sig_alarm() fires every timeout that is already due. The if/else order is deliberate. The delay timeout is checked first because the cancel supersedes the deadlock check, so the both-set case resolves to the cancel, and no defensive branch is needed. You're right about the coverage too. Only the delay > deadlock_timeout regime is exercised today, and -1 is the one where the second wait has no startup-side timer to fall back on. This patch will be rebased on top of the deadlock-detector fix that lands first, and I'll add a -1 regime test as part of that rebase. -- JH Shin
