Can't Ctrl+C abort offlineimap if -1 option given

Ethan Glasser-Camp glasse at cs.rpi.edu
Thu Mar 24 10:18:19 UTC 2011


On 03/23/2011 11:06 AM, Sebastian Spaeth wrote:
> Could do that, but then it seems like imaplib2 is not shutting down
> their reader/writer threads properly when it receives a logout(). At
> least there is still some IMAP activity going on, even after a logout()
> finished. So that would require investigation in any case.

OK, so here's what I'm seeing about -1 and Ctrl-C.

1. Ctrl-C does NOT interrupt a folder sync.  This is in no way related 
to imaplib2 (exists in v6.3.2).  I think this is due to the wait on a 
semaphore in threadutil, since (as we've seen) you can choose no wakeups 
or to receive signals but you can't have both.  I haven't been able to 
fix this yet.

2. Ctrl-C AFTER the folder sync causes offlineimap to go into a hang.  I 
think this is fixed by the attached patch.  This ensures that 
holdordropconnections() is called, even in the "exceptional" case of 
KeyboardInterrupt.

Ethan



More information about the OfflineIMAP-project mailing list