Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: news.software.b Subject: Painful interactive posting response from C news Message-ID: Date: 9 Mar 91 17:52:31 GMT Sender: news@warwick.ac.uk (Network news) Organization: Computing Services, Warwick University, UK Lines: 43 Nntp-Posting-Host: shark Posting news via NNTP to our (admittedly overloaded) news server often borders on the painful, like time to go and make a cup of coffee. Whilst idling some time until I got a prompt back, I followed what was happening, and it seems to be this: nntpd -> inews -W -> relaynews newsrun -> relaynews grabs lock tries to get lock, sleeps ... ... releases lock grabs lock wakes up, still locked, sleeps ... ... releases lock grabs lock wakes up, still locked, sleeps ... ... realease lock ... etc. On a bad day, this can take 15 - 20 minutes. It seems like what is needed is some sort of mechanism to say "I'm next". I can see the aversion to using flock/lockf, but has anyone tried adapting the algorithm to do something like (this isn't real shell, you understand, it's all running as one process) ... echo $$ > LOCKtmp while :; do if ln LOCKtmp LOCK; then break else ln LOCKtmp LOCK.wait sleep n fi done ... rm LOCK kill -ALRM `cat LOCK.wait` Am I dreaming ? Suggestions ? Cheers, Rob -- UUCP: ...!mcsun!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick INET: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England