Can bogofilter run by multiprocess at the same time

David Relson relson at osagesoftware.com
Thu Oct 14 13:24:47 CEST 2004


On Thu, 14 Oct 2004 11:32:01 +0200
Matthias Andree wrote:

> On Thu, 14 Oct 2004, _________ wrote:
> 
> > BTW, is there any library that I can call in my C code to check if
> > an email is a spam instead of calling popen()?
> 
> Not at this time, unfortunately.

Matthias,

At present function main(), in addition to calling bogofilter() to do
the classification, also does setup and tear down.  We could rename it
to bogomain(), a callable function which does all the work, and change
main() to a wrapper for bogomain().  The result would look like:


// bogomain.c
//    (skeleton)

ex_t bogomain(int argc, char **argv) /*@globals errno,stderr,stdout@*/
{
    rc_t status;
    ex_t exitcode = EX_OK;

    ...

    return exitcode;
}

// main.c
//    (complete)

int main(int argc, char **argv)
{
    ex_t exitcode = bogomain(argc, argv);
    exit(exitcode);
}



More information about the bogofilter-dev mailing list