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 2.0.4).

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: http://lists.freepascal.org/lists/fpc-pascal/2007-April/013558.html]

Bye
--
Luca

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to