prefork

Zbierski Christophe Christophe.Zbierski at atos.net
Fri Sep 30 05:38:45 EDT 2011


Hi, I continued to analyze the problem :

In master.c (main() function)

    masterconf_getsection("START", &add_start, NULL);
    masterconf_getsection("SERVICES", &add_service, NULL);
    masterconf_getsection("EVENTS", &add_event, NULL);

    /* set signal handlers */
    sighandler_setup();

    /* initialize services */
    for (i = 0; i < nservices; i++) {
        service_create(&Services[i]);
        if (verbose > 2)
            syslog(LOG_DEBUG, "init: service %s socket %d pipe %d %d",
                   Services[i].name, Services[i].socket,
                   Services[i].stat[0], Services[i].stat[1]);
    }

There is 2 actions, one to read the configuration (add_service()), and another to create services (service_create()).
nservices contains the number of services, it's updated in add_service(), but service_create() function also updates this variable :

        if (s == &service) {
            if (nservices == allocservices) {
                if (allocservices > SERVICE_MAX - 5)
                    fatal("out of service structures, please restart", EX_UNAVAILABLE);
                Services = xrealloc(Services,
                                    (allocservices+=5) * sizeof(struct service));
                if (!Services) fatal("out of memory", EX_UNAVAILABLE);
            }
            memcpy(&Services[nservices++], s, sizeof(struct service));
        }

I do not understand this part of code.

Christophe Z.


De : cyrus-devel-bounces+christophe.zbierski=atos.net at lists.andrew.cmu.edu [mailto:cyrus-devel-bounces+christophe.zbierski=atos.net at lists.andrew.cmu.edu] De la part de Zbierski Christophe
Envoyé : mercredi 28 septembre 2011 11:03
À : cyrus-devel at lists.andrew.cmu.edu
Objet : prefork

Hi, it seems there is a problem with the 'prefork' parameter.

Example:
cyrus.conf

START {
}
SERVICES {
imap            cmd="imapd"     listen="143"    prefork=2
}
EVENTS {
}


I did a test cyrus 2.3 and 2.5, and systematically, the number of process is twice larger than the parameter.


Regards,

Christophe Z.

________________________________

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité d'Atos ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.

________________________________

Ce message et les pièces jointes sont confidentiels et réservés à l'usage exclusif de ses destinataires. Il peut également être protégé par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir immédiatement l'expéditeur et de le détruire. L'intégrité du message ne pouvant être assurée sur Internet, la responsabilité d'Atos ne pourra être recherchée quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'expéditeur ne donne aucune garantie à cet égard et sa responsabilité ne saurait être recherchée pour tout dommage résultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Atos liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.andrew.cmu.edu/pipermail/cyrus-devel/attachments/20110930/ce100065/attachment-0001.html 


More information about the Cyrus-devel mailing list