The forked process is pretty much independent. In fact, this is probably the main drawback of the fork() multiprocessing model: Its impossible for processes to influence each other's address space after the fork() has happened even if you want to pass data around.
Things to look out for: * both processes will try to run exit handlers (e.g. delete temporary files) * you need to be careful with open file handles, ideally have the child close everything to completely detach. Libraries that have fds open might be unhappy about this, though. On Friday, October 26, 2012 8:33:25 PM UTC+1, Pavel Panchekha wrote: > > I have a Sage package/module that does parallelism by forking and > communicating over pipes. This of course forks the whole Sage executable. > > This seems to sometimes (but rarely) result in any of a large number of > problems: double-frees, corrupted internal glibc structures, hangs, null > pointers in absurd places, and so on. > > Is this a known bug? Is this something that should work? Is forking Sage > just impossible to support? > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-devel?hl=en.
