On Sat, Sep 02 2023, Stefan Kangas wrote: > Did you get any further with this? Well, a bit. I'm currently using the attached patch and for testing the attached shell script. The patch is good enough to pass these tests. I don't know if it breaks something else. I had to change maybe_reacquire_global_lock to make the tests pass. The idea behind maybe_reacquire_global_lock seems dubious: waiting for a lock in a signal handler seems, well, problematic. Anyway, the patch is work in progress and only useful to me. (The patch also includes changes for Windows, but I only tested those manually and under Wine. For the Windows console version, C-g doesn't interrupt condition-wait. Ordinary endless loops don't seem be interruptible there either. So, maybe this is acceptable.) Helmut