[Zope] New version of mod_pcgi

Oleg Broytmann phd2@email.com
Fri, 25 Jun 1999 20:23:28 +0400 (MSD)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--784556711-931686155-930327808=:30937
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hi!

On Sun, 20 Jun 1999, Andrew M. Kuchling wrote:
> Eek, you're right; the Apache child dumps core.  Luckily, the fix is
> simple.  Edit mod_pcgi.c, and around line 419, change this line:
> 
>             int rsize, len_read, rpos;
> to
>             int rsize, len_read, rpos = 0;

   This helped a bit, but not much. I can start Zope from mod_pcgi and use
it. But after I shutted Zope down, I cannot start it using Zope.cgi -
"resource temp unavail". I have to restart Apache to use Zope.cgi :(

   If you don't mind, I'm sending you some minor patches (attached) for
cleaner compilation. -Wall still gives some warnings, but they are not
significant, I think...

> -- 
> A.M. Kuchling			http://starship.python.net/crew/amk/
> This is not a technical issue so much as a human issue; we are limited and so
> is our time. (Is this a bug or a feature of time? Careful; trick question!)
>     -- Fred Drake on the Documentation SIG, 9 Sep 1998

Oleg.
---- 
   Oleg Broytmann     National Research Surgery Centre     phd2@email.com
           Programmers don't die, they just GOSUB without RETURN.

--784556711-931686155-930327808=:30937
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=diff2
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.04.9906252023280.30937@emerald.netskate.ru>
Content-Description: 
Content-Disposition: attachment; filename=diff2

KioqIHBjZ2kuYy0wMQlTYXQgSnVuIDE5IDA3OjI1OjE3IDE5OTkNCi0tLSBw
Y2dpLmMJRnJpIEp1biAyNSAxOTo0MzowOSAxOTk5DQoqKioqKioqKioqKioq
KioNCioqKiA0OSw1NCAqKioqDQotLS0gNDksNTUgLS0tLQ0KICAgICAgLSAo
amVmZikgYWRkZWQgV2luMzIgc3VwcG9ydA0KICAqLw0KICAjaW5jbHVkZSAi
cGNnaS5oIg0KKyAjaW5jbHVkZSA8dXRpbF9zY3JpcHQuaD4NCiAgDQogICNp
ZmRlZiBDUkVPU09URQ0KICAjaW5jbHVkZSAiY3Jlb3NvdGUuaCIgIC8qIHVz
ZWQgZm9yIGRlYnVnZ2luZyAqLw0KKioqKioqKioqKioqKioqDQoqKiogMzM0
LDM0MCAqKioqDQogIHsNCiAgICBjaGFyICoqZW52Ow0KICAgIHBjZ2lSZXNv
dXJjZSAqcGNnaSA9IChwY2dpUmVzb3VyY2UgKilwY2dpcDsNCiEgICByZXF1
ZXN0X3JlYyAqciA9IHBjZ2ktPnJlcXVlc3Q7DQogICAgaW50IGNoaWxkX3Bp
ZDsNCiAgICB0YWJsZSAqZSA9IHItPnN1YnByb2Nlc3NfZW52Ow0KICANCi0t
LSAzMzUsMzQxIC0tLS0NCiAgew0KICAgIGNoYXIgKiplbnY7DQogICAgcGNn
aVJlc291cmNlICpwY2dpID0gKHBjZ2lSZXNvdXJjZSAqKXBjZ2lwOw0KISAg
IHJlcXVlc3RfcmVjICpyID0gKHJlcXVlc3RfcmVjICopcGNnaS0+cmVxdWVz
dDsNCiAgICBpbnQgY2hpbGRfcGlkOw0KICAgIHRhYmxlICplID0gci0+c3Vi
cHJvY2Vzc19lbnY7DQogIA0K
--784556711-931686155-930327808=:30937
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=diff3
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.04.9906252023281.30937@emerald.netskate.ru>
Content-Description: 
Content-Disposition: attachment; filename=diff3

KioqIG1vZF9wY2dpLmMtMDEJU3VuIEp1biAyMCAxOToyMzozNyAxOTk5DQot
LS0gbW9kX3BjZ2kuYwlGcmkgSnVuIDI1IDE5OjU0OjE4IDE5OTkNCioqKioq
KioqKioqKioqKg0KKioqIDUyLDU3ICoqKioNCi0tLSA1Miw1OCAtLS0tDQog
ICNpbmNsdWRlICJodHRwX3Byb3RvY29sLmgiDQogICNpbmNsdWRlICJodHRw
X3JlcXVlc3QuaCINCiAgI2luY2x1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XQgIT0gMCkNCiAgICAgIHsNCiEgICAgICAgaW50IHNl
bnQ7DQogICAgICAgIGNoYXIgYnVmZmVyW0hVR0VfU1RSSU5HX0xFTisxXTsN
CiAgDQogICAgICAgIHItPnBfb3V0cHV0ID0gcF9vdXRwdXQ7IHItPnN6X291
dHB1dCA9IHN6X291dHB1dDsNCg==
--784556711-931686155-930327808=:30937--