[fpc-pascal] problem with threads and backgrounding, fpc 2.1.3 arm native
luca at ventoso.org
Tue Sep 25 11:48:56 CEST 2007
En/na Luca Olivetti ha escrit:
> En/na Luca Olivetti ha escrit:
>> This is another test program that shows my problem with fork: as soon
>> as I start the thread, the main program stops working (the thread *is*
>> running, you can put a writeln in its loop to show it). Note that in
>> this short example I don't close stdin,stdout,stderr, I don't block
>> signals but it doesn't matter (I did it all and the result is the same).
>> The same happens with the native compiler and the cross compiler.
>> Now, if I remove the fork part, both the thread and the main loop
>> work, but if I use crtl-z and then fg after the thread has started it
>> will give an EAccessViolation, but this only with the native compiler
>> (remind that the native compiler is 2.1.3 while the cross compiler is
> Now tested with a self-built 2.1.4 and it does the same.
> Unfortunately I still cannot test with a newer kernel.
> [test program removed, original post available at:
Just tried again with the 2.2.0 compiler available at
Without the fork everything seems to work ok, ctrl-z and then fg (or bg)
doesn't cause the EAccessViolation anymore.
With the fork the main loop stops as soon as the thread starts.
More information about the fpc-pascal