is fork() supported?
DJ Delorie
dj@redhat.com
Wed Aug 4 20:00:17 GMT 2021
I don't mean fork/exec (duh) but a fork() and keep going...
Consider a case where a process is using a file-backed mapping for
closures; a fork() doesn't isolate that backing between parent/child
so there's a chance (for example) the parent could deallocate a
closure that the child needs, etc...
I see four options...
1. Not supported. Sorry.
2. Supported only if you have fork-able closure backings (mmap or
maybe ktmpfile, but not file-backed) but this means documenting
that (at least) selinux settings might affect this. Caveat
Programmer.
3. Some API that says "I need this" so it can fail in a more useful
way than "segfault".
4. Fully supported, and we have some work to do to handle fork events.
Comments?
DJ
More information about the Libffi-discuss
mailing list