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

Nicolas Sebrecht nicolas.s-dev at laposte.net
Thu Mar 24 18:19:24 UTC 2011


On Thu, Mar 24, 2011 at 06:18:19AM -0400, Ethan Glasser-Camp wrote:
> 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.

Could you send the patch NOT attached, please? It's a much better way to
make reviews/comments easy and give it a wider audiance.

Thanks.

-- 
Nicolas Sebrecht



More information about the OfflineIMAP-project mailing list