Jonas Maebe wrote:

In some cases memory is still allocated between the fork and the exec. You cannot use vfork in such a case. That code still has to be rewritten so it does not allocate any memory.
Do you suggest that some improvement should be done there ? Of course I will try to do this for the other architectures once I'll get started with that task and fully understand the implications. I feel that a better solution would be e.g. to drop the fpVFork function altogether and do the difference (if necessary at all) in the fpFork function.

- vfork seems to be used in BSD and SUNOS. Why just in these systems ?

Correction: it is only used on those systems if the RTL is libc-based. And the reason is that our thread variable implementation and its use in the syscall implementations conflicts with using vfork.
Don't you use the pthread library for the implementation of pascal threads ? (Threads and inter thread communications is another issue that I'll need to investigate - and maybe improve - when I'll start to do the "embedded pascal" project.)

- 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 ?)

Does it already have posix_spawn?
I don't know. The expert are just trying to get a 2.6. µCLinux version out of the door and I don't even have any hardware to test yet.

Thanks for your answers !

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

Reply via email to