[Resend: I forgot to cc p5p]
On Fri, 25 Jul 1997 17:22:09 EDT, Doug MacEachern wrote:
>> >Were you able to run Apache w/ mod_status & perl?
>>
>> Not yet, maybe tonight.
>
>Now I get "Unhandled execption in Apache.exe(PERL.DLL); 0x...:
>Access Violation." During perl_alloc(), win32_malloc() tries to
>pIOSubSystem->pfnmalloc(size), but it looks like pIOSubSystem has not
>been initialized at all (0x
00000000). I've poked around, guessing,
>tried adding:
>PERL_SYS_INIT(&argc,&args);
>SetIOSubSystem(&win32stdio);
The first thing I noticed was Apache is threaded, and mod_status
code will be invoked in a thread different from the main one.
The second thing I found out was I couldn't reproduce the problem
when running Apache with perl.dll produced by Borland.
Putting two and one together, I came up with this fix.
Note that another way to fix it would be to initialize
pIOSubSystem in DllMain's DLL_THREAD_ATTACH, but there is
no call for pIOSubSystem to be thread-local in the first
place (it is simply a pointer to an application level
global).
p5p-msgid:
199707261518.LAA24346@aatma.engin.umich.edu