I use the `timeout` executable from GNU coreutils for this purpose. See the 
usage in my sync script here:

https://github.com/wincent/wincent/blob/16b86434/roles/dotfiles/files/.mutt/scripts/sync.sh#L50

-Greg

Mike Glover wrote:

> Hi folks-
> 
> I'm having a recurring problem with my mbsync (v1.2.1) failing to 
> exit -- I can see the process in ps, and the last line in my log file 
> is:
> 
> IMAP error: unexpected EOF from mail.pobox.com (64.147.108.30:993)
> 
> I have this script that runs mbsync in a loop:
> 
> #!/bin/sh
> 
> # just sync inboxen
> short="pobox:INBOX riseup:INBOX"
> 
> # sync all boxen
> long="-a"
> 
> for opts in "$short" "$short" "$long"; do
>     killall mbsync
>     sleep 5
>     /opt/net/bin/mbsync -V $opts 2>&1
>     sleep 60
> done
> 
> 
> I added the 'killall mbsync; sleep 5' as a workaround for this problem, 
> but I'd like to find a real solution.  If there's other info I can 
> provide to help track this down, please let me know.
> 
> Thanks,
> 
> -mg 
> 
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> _______________________________________________
> isync-devel mailing list
> isync-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/isync-devel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to