[haiku-bugs] Re: [Haiku] #13446: POSIX: add posix_spawnp(), posix_spawn()

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Tue, 12 Sep 2017 20:16:20 -0000

#13446: POSIX: add posix_spawnp(), posix_spawn()
----------------------------+----------------------------
   Reporter:  korli         |      Owner:  nobody
       Type:  enhancement   |     Status:  closed
   Priority:  normal        |  Milestone:  Unscheduled
  Component:  System/POSIX  |    Version:  R1/Development
 Resolution:  fixed         |   Keywords:
 Blocked By:                |   Blocking:
Has a Patch:  1             |   Platform:  All
----------------------------+----------------------------

Comment (by pulkomandy):

 The idea in Linux is to implement fork with copy-on-write, so no need to
 actually copy any of the data when forking (just the memory mapping needs
 to be copied and made read-only). However this would conflict with our
 "don't overcommit memory" management.

 So, a vfork-style syscall to be used inside posix_spawn may be useful. But
 it seems one can get in a lot of trouble when multiple threads are
 involved, for example (in principle, vfork should block all of them in the
 parent until the child is done with its exec or exit). This is why making
 fork() as quick as possible may actually be a better idea.

--
Ticket URL: <https://dev.haiku-os.org/ticket/13446#comment:7>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: