[Pine-info] Reducing KODRETRY

Steven W. Orr steveo at syslang.net
Sat Dec 23 11:08:04 PST 2006


On Friday, Dec 22nd 2006 at 02:38 -0800, quoth Joseph Tam:

=>
=>After the millionth time of making the mistake of running pine and forgetting
=>I already had one suspended in the background, then having to wait seemingly
=>forever (but really only 20secs) for the locking to fail so I could get
=>control back, I decided to finally hunt this chunk of code down to see if
=>I could shorten this wait.
=>
=>Aparently, it's in imap/src/osdep/unix/unix.c:unix_open(), and mailbox
=>locking is tried KODRETRY=15 times, with 1 second sleep between retries.
=>Is it OK if I reduce this to, say, 1? Would this break imapd which uses
=>the same library, and presumably, unix_open()?
=>
=>Joseph Tam <tam at math.ubc.ca>

Sorry but this has been going on for a few days and I'm not sure it was
properly treated or not. It seems like a bash function could solve your
problem. Something like...


pine ()
{
if jobs -ls pine > /dev/null
then
fg
else
\pine
fi
}

Of course, this can be tightened up to...


pine ()
{
jobs -ls pine > /dev/null && fg || \pine
}

which is small enuff that you could even get it into an alias...

alias pine='jobs -ls pine > /dev/null && fg || \pine'

Enjoy?

--
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net



More information about the Pine-info mailing list