>
>
>
> Perhaps it is possible to wrap libc's fork() in a ccall.  This might
> happen without Julia even be aware... Getting data back from the child
> processes may be a bit tricky, I suppose you can always use the file system
> (that's what I did at the time) or communicate through a pipe or socket.
>
>
>
pfork in package PTools.jl does exactly this, i.e. uses pipes to return
data. If you allocate a shmem segment before calling pfork, data can be
returned via the shmem too.

One of the problems with fork (among others), is that the child starts with
only a single thread (the calling thread), hence any library that has its
own threads in the parent are in an inconsistent state in the children.

Reply via email to