public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* is fork() supported?
@ 2021-08-04 20:00 DJ Delorie
  2021-08-05  8:17 ` Andrew Haley
  0 siblings, 1 reply; 15+ messages in thread
From: DJ Delorie @ 2021-08-04 20:00 UTC (permalink / raw)
  To: libffi-discuss


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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-08-25 21:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 20:00 is fork() supported? DJ Delorie
2021-08-05  8:17 ` Andrew Haley
2021-08-05  8:27   ` Florian Weimer
2021-08-24 18:15     ` DJ Delorie
2021-08-24 18:27       ` Jay K
2021-08-24 18:45         ` DJ Delorie
2021-08-24 21:12           ` Kaz Kylheku (libffi)
2021-08-24 21:58             ` Jay K
2021-08-25  9:27               ` Andrew Haley
2021-08-25 15:58                 ` Jay K
2021-08-25 16:59                 ` Kaz Kylheku (libffi)
2021-08-25 21:17                   ` Andrew Haley
2021-08-05 18:13   ` DJ Delorie
2021-08-05 21:21     ` Jay K
2021-08-06  8:32       ` Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).