As I intend to port FP to a non MMU architecture at some point in the future I came across this issue:

In the RTL there are some functions that do a fork. The RTL supports as well calling fork() as vfork() API (via fpFork and fpVFork).

Here a setting USE_VFORK is acknowledged to decide which one is to be used.

Questions:
- not in all instances the difference is provided. sometimes fork() is done unconditionally - Why is fork used at all. AFAIK, all systems can do vfork() (with _at_least_ the same performance as fork() and thus the difference is not needed. Regarding the function there is a difference between fork() and vfork() only if exec?() is _not_ called immediately afterwards, which seems to be the case in the FP RTL.
- vfork seems to be used in BSD and SUNOS. Why just in these systems ?
- when doing a non-MMU (µCLinux) architecture fork is not available. What is the best way of handling that situation ? (Should we introduce a UCLINUX OS flavor ?)

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

Reply via email to