a tiny fix to Python hooks in INN

greg andruk gerglery at usa.net
Thu Dec 2 13:41:08 UTC 1999

On Thu, 2 Dec 1999, Ilya Etingof wrote:

> Perhaps putenv() based implementation of setenv() would use extra memory
> (malloc()'ed or static buffer) when formatting putenv()'s argument. It
> also might have to call getenv() prior to putenv() what also seems to be
> a little bit less efficient than direct environ lookup and modification.

Well, we're talking about something that's run once at the start of the
program.   Something like this in PYsetup() ought to be fine without
adding to the library:

    char	*newenv, *pythonpath = "PYTHONPATH=";

    newenv = NEW(char, strlen(pythonpath) + strlen(innconf->pathfilter) +  1);
    strcpy(newenv, pythonpath);
    strcat(newenv, innconf->pathfilter);

> Do you think environ based setenv() is not portable enough?

No problem with the portability question, but why swat a flea with a

More information about the inn-workers mailing list