Re: Advice Required - for avoiding conflict betwen qmail-smtpd, rblsmtpd loaded as shared objects in tcpserver
Manvendra Bhangui <[email protected]> Sun, 2 Apr 2017 10:51:32 +0530
| Newsgroups | gmane.mail.qmail.general |
|---|---|
| Message-ID | <CAOqj+1NzM=cCDz4SzWbng9=X7zpD+1T0_KSzk1hM6_c_VBgiqQ@mail.gmail.com> |
On 2 April 2017 at 10:34, Jens Bauer <[email protected]> wrote: > Hi Manvendra. > > On Sun, 2 Apr 2017 10:18:31 +0530, Manvendra Bhangui wrote: >> No I do not have any data. It is definitely not a bottleneck. It's >> just that the idea of loading the control files just once does look >> good. The right thing to do is load it only once, if it can be done >> without compromising the integrity of tcpserver. > > I agree on this and I like the idea (especially because I once ran out of open files in Apache, since I had a log file for each web-site it served). > > Question: Do you read the data into read-only memory and then share a pointer (when read-only memory is available, that is) ? > I have written a wrapper named open_control_once() to open any control file. This function sets up a flag to indicate that a control file has been opened. If it is called multiple times, it just returns without doing anything. The data however is not in read-only memory (constmap and stralloc structures). But I do prevent a control file from being opened multiple times.