> Could this mean that the structure info in the child would be invalid?
Nope; immediately after fork() the two processes are completely identical except for the return value they see from the fork() system call. This means that all the memory addresses (and therefore pointer values) have the same meaning in both processes, just that they (logically) refer to separate copies of the same thing. What's the problem you're encountering, including any error messages? (You may want to use gist.github.com to paste the errors.) -Jey On Tue, Aug 5, 2014 at 11:12 AM, Gerry Weaver <[email protected]> wrote: > Hi Stefan, > > If I understand correctly, the function pointer to the Julia function isn't > actually a pointer. It is a structure containing information about the > function. Could this mean that the structure info in the child would be > invalid? The code cores out when the callback function is called from the > child process. > > Thanks, > -G > > > On Tuesday, August 5, 2014 8:23:11 AM UTC-5, Stefan Karpinski wrote: >> >> It should work but since the child and parent will babe separate memory >> spaces (albeit forked copies), they won't be able to pass any data between >> them. >> >> > On Aug 5, 2014, at 12:49 AM, Gerry Weaver <[email protected]> wrote: >> > >> > Hello All, >> > >> > I'm trying to call a c function from Julia that forks and calls a >> > provided Julia callback function. Should this work or are there limitations >> > that would prevent this from working? I know the spawn function calls fork, >> > but I'm not sure how the callback would work. >> > >> > Thanks, >> > -G
