Messages in this thread | | | Subject | Re: popen/pclose problem in Linux 2.2.x with vfork/glibc 2.1 | Date | Sat, 27 Mar 1999 21:17:22 -0500 | From | "Brandon S. Allbery KF8NH" <> |
| |
In message <19990327180106.A22107@dancer.ca.sandia.gov>, Pete Wyckoff writes: +----- | pid = vfork(); | if (pid < 0) return -1; | if (pid == 0) { | if (dup2(p[1], 1) < 0) | exit(127); | close(p[0]); | close(p[1]); +--->8
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".)
(And shouldn't the exit()s in the child be _exit()s instead?)
-- brandon s. allbery [os/2][linux][solaris][japh] allbery@kf8nh.apk.net system administrator [WAY too many hats] allbery@ece.cmu.edu carnegie mellon / electrical and computer engineering KF8NH We are Linux. Resistance is an indication that you missed the point.
- 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/
| |