Re:Fork() without exec() is dangerous in large programs
by ithkuil on Wednesday August 17, 2016 @04:55AM
(#12303249)
yeah, that's why vfork has been introduced back in the days.
See http://man7.org/linux/man-pages/man2/vfork.2.html
[ Parent
| on HN ]
Re:Fork() without exec() is dangerous in large programs
by the_why_of_y on Wednesday August 17, 2016 @09:02AM
(#12304310)
The "historic description" in the man page you cite disagrees: vfork(2) was added before BSD had copy-on-write, so the memory was actually copied and vfork(2) is essentially a crude hack to avoid that.
Unfortunately once copy-on-write was implemented, the crude hack was retained for backwards compatibility....