Re: popen/pclose problem in Linux 2.2.x with vfork/glibc 2.1

Horst von Brand (vonbrand@sleipnir.valparaiso.cl)
Sun, 28 Mar 1999 11:34:15 -0500


"Albert D. Cahalan" <acahalan@cs.uml.edu> said:
> Brandon S. Allbery KF8NH writes:
> > Ahem. It's *vfork*, you can't do e.g. fd manipulations. (Does
> > there exist a "true vfork" where this would work? My memory of
> > the original says "no, forget it".)

> The standard allows a range of behavior, including the extremes
> of "just like fork" and "nothing useful works". Extremes are bad.

The standard allows "nothing useful works", so a portable program (or
library) has to work in that case too, and the kernel implementers can
rightly give you exactly that if convenient.

> What people seem to want most:
> open, close, dup, dup2, _exit, execve, stat, fstat, lstat,
> link, unlink, rename, lseek, fsync, read, write, socket...

Then use fork(2). vfork(2) is just a lightweight (half)implementation of
fork(2) for cases where you can get away with it.

-- 
Horst von Brand                             vonbrand@sleipnir.valparaiso.cl
Casilla 9G, Viņa del Mar, Chile                               +56 32 672616

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/