← Back to context

Comment by remexre

4 years ago

Isn't vfork much worse in terms of the problem the author is talking about, since the child can now acquire locks in the _parent's_ address space?

I thought the point of vfork is that they do not share an address space. But there are other things still shared and they should really just have a CreateProcess.

  • They still share an address space until exec replaces it for one of them. Particularly awful is that they share the same mutable stack which is a pathway that only leads to the inner circle of hell.

    • Assuming you call exec, of course. To not call exec after vfork is not an option; one of the many ways the fork family of functions are fundamentally broken.

      1 reply →