This fixes a FH leak on Perl when running with taint-checks.

Note also that if fork() fails, then apparently only p[This] is closed, 
not p[That]. (?!)

Enjoy,
Ilya

--- ./util.c.a	Fri Dec  5 01:56:48 1997
+++ ./util.c	Mon Dec 15 02:01:34 1997
@@ -1869,14 +1869,14 @@ my_popen(char *cmd, char *mode)
 	return my_syspopen(cmd,mode);
     }
 #endif 
-    if (pipe(p) < 0)
-	return Nullfp;
     This = (*mode == 'w');
     that = !This;
     if (doexec && tainting) {
 	taint_env();
 	taint_proper("Insecure %s%s", "EXEC");
     }
+    if (pipe(p) < 0)
+	return Nullfp;
     while ((pid = (doexec?vfork():fork())) < 0) {
 	if (errno != EAGAIN) {
 	    close(p[This]);
--- ./os2/os2.c.a	Thu Dec 11 19:26:28 1997
+++ ./os2/os2.c	Mon Dec 15 02:03:58 1997
@@ -631,8 +631,6 @@ char	*mode;
     PerlIO *res;
     SV *sv;
     
-    if (pipe(p) < 0)
-	return Nullfp;
     /* `this' is what we use in the parent, `that' in the child. */
     this = (*mode == 'w');
     that = !this;
@@ -640,6 +638,8 @@ char	*mode;
 	taint_env();
 	taint_proper("Insecure %s%s", "EXEC");
     }
+    if (pipe(p) < 0)
+	return Nullfp;
     /* Now we need to spawn the child. */
     newfd = dup(*mode == 'r');		/* Preserve std* */
     if (p[that] != (*mode == 'r')) {
