getpid/vfork broken
Roland McGrath
roland@redhat.com
Mon Mar 8 02:37:00 GMT 2004
The new specification for vfork where you can't even call dup2 is very
close to useless. The origin of vfork and true standard for its behavior
that applications have been written for is 4.2BSD, where simple system
calls were always safe, and getpid has always been the simplest system
call. The modern BSD specification remains that the address space is
shared, with all that entails, but since getpid has never relied on data
contents in the address space before, citing that as license to make it do
the wrong thing is dubious at best. Since the useless specification has
been enshrined in POSIX, where vfork in fact never belonged at all, it is
likely that every historical program will be broken and people will just
have to adapt to giving up vfork entirely. Progress.
More information about the Libc-hacker
mailing list