[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [leafnode-list] File locking
Sorry that I'm not quoting anything, but the computer on which I
read my mail seems to be down. I read the other replies via telnet
on port 110 and hope that I inserted the correct subject and in-reply-to
Some time ago I also tried to implement local groups. I failed because
somewhere I had a bad memory leak noone could find. However, I also
to develop a locking mechanism for the nntpd. My approach was the
I didn't change the lockfile behaviour of fetchnews and texpire.
The nntpd would, if it has to store a posting, fork(). The child process
looked for a lockfile and maybe waited till it's gone, then creates its
own lockfile while storing the article and updating the .overview and the
groupinfo. This has the advantage that you can post while fetching or
expiring and not the server with which you're communicating will hang but
a child process which, of course, shouldn't communicate with the client.
If you don't want fetchnews or texpire to fail, just because
someone is posting at the same moment, you should probably try locking the
file several times. Cornelius, with the new lockfile mechanism I sent
to you some month ago this should be possible by calling fcntl() with
F_SETLKW instead of F_SETLK and setting a timer for the locking procedure.
I'll read your replies on monday when the computer's back.
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list