When Emacs is blocked in condition-wait, then C-g doesn't seem to work. E.g. Emacs hangs and pressing C-g has no apparent effect when executing the attached file with: emacs -Q -l deadlock.el -f deadlock Mabye sys_cond_wait could call pthread_cond_timedwait with a fairly long timeout, say one second, and repeatedly check if C-g was pressed.