Revert "Rewrite the entire internal signal handling/wakeup."