[fpc-devel] Lazarus Apache module crashes during concurrent requests
ABorka
fpc-devel at aborka.com
Sun Oct 5 09:15:43 CEST 2008
Hi Jonas,
This seems to work on Windows (and solves the problem), but on Linux
WaitForThreadTerminate waits forever.
WaitForThreadTerminate(BeginThread(@__dummythread), 300);
apache just waits and doesn't start until I stop the apache loading with
ctrl+c, as if it is in an infinite loop and waiting.
Any thoughts?
AB
Jonas Maebe wrote:
>
> On 24 Sep 2008, at 10:58, ABorka wrote:
>
>> I'm not sure that something is changed to make it incompatible.
>> The apache modules compiled on windows are only crashing if multiple
>> requests are coming at the same time, and they are crushing at
>> function/procedure returns (Yes, on Linux it is even worse, since no
>> module gets even loaded by apache. That might be some C API
>> translation problem).
>
>
> Maybe you have to initialise the threading system so all the necessary
> locks in the system unit get activated. Something like
>
> {$ifdef unix}
> uses
> cthreads;
> {$endif}
>
> ...
>
> function dummythread(p: pointer): ptrint;
> begin
> end;
>
> initialisation
> WaitForThreadTerminate(BeginThread(@dummythread));
> end.
>
>
> Jonas
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
More information about the fpc-devel
mailing list