Thread View: news.software.nntp
1 messages
1 total messages
Started by Chris Dent
Mon, 26 Aug 1996 00:00
ACT_STYLE = MMAP on HPUX 10.10 with INN 1.4 (with possible solution)
Author: Chris Dent
Date: Mon, 26 Aug 1996 00:00
Date: Mon, 26 Aug 1996 00:00
55 lines
2266 bytes
2266 bytes
I decided I wanted to use MMAP for ACT_STYLE on our new HPUX 10.10
INN 1.4unoff4 server. At first it did not work correctly, the active
file was not updated frequently enough.
So I checked the FAQ and found this:
froh@devnull.franken.de (Frohwalt Egerer) writes:
In the source look for the place where INN would write the active file
back to disk if MMAP was turned off. At that place I added a 'msync()'
to the 'MMAP' branch to make it work on my university's HPs.
I modified $INN/innd/icd.c as follows:
<code snippet>
void
ICDwriteactive()
{
#if defined(ACT_MMAP)
/* add an msync here to see if we can get the server doing
the right thing. We hope these are the right args */
if(msync(ICDactpointer, ICDactsize, MS_ASYNC) == EINVAL) {
syslog(L_FATAL, "%s cant msync %s %m", LogName, ICDactpath);
exit(1);
}
#else
if (lseek(ICDactfd, 0L, SEEK_SET) == -1) {
syslog(L_FATAL, "%s cant rewind %s %m", LogName, ICDactpath);
exit(1);
}
if (xwrite(ICDactfd, ICDactpointer, ICDactsize) < 0) {
syslog(L_FATAL, "%s cant write %s %m", LogName, ICDactpath);
exit(1);
}
#endif /* defined(ACT_MMAP) */
}
</end of code snippet>
My question is this: Is the addition of the msync() the correct thing to
do. If it is, is the way I've done it correct?
It appears to be working correctly (active file updates are happening
as expected).
If this is correct this seems like something that might be helpful in
the FAQ.
Thanks for any input.
--
Chris Dent <cdent@indiana.edu> http://detritus.ucs.indiana.edu/~cdent/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads