[fpc-devel] fpfork

Michael Schnell mschnell at lumino.de
Mon Feb 11 16:57:43 CET 2008


>
> The single code point would have to implement "vfork+exec" semantics. 
> You cannot do this for fork/vfork on their own, because they also have 
> other uses besides executing an external program (e.g. fork is also 
> used for daemons).
OK, If possible "fork+exec" would be nice if any use of fork in the RTL 
can be avoided. If not and if any use of fork that does not allow 
replacement with vfork can be avoided a combined fp_V_Fork might be good.
>
> After every system call, we store error code in the rtl's errno 
> equivalent. This errno is a thread variable.
>
> I don't know what exactly the problem is (possibly that the child 
> overwrites the parent's errno, or maybe sometimes you have to allocate 
> memory or change other global state when looking up a threadvar), but 
> Daniƫl tried to add vfork support to the Linux/syscall rtl and said 
> that he failed because "It seems our threadvar handling is vfork 
> incompatible"
>
I'm storing this for future reference.

Thanks,
-Michael



More information about the fpc-devel mailing list