diff src/process-unix.c @ 932:5c7570514cc5

[xemacs-hg @ 2002-07-25 00:23:45 by youngs] 2002-07-25 Steve Youngs <youngs@xemacs.org> * process-unix.c (child_setup): (unix_create_process): Revert Mike's patch of 2002-07-20.
author youngs
date Thu, 25 Jul 2002 00:23:46 +0000
parents eaedf30d9d76
children 025200a2163c
line wrap: on
line diff
--- a/src/process-unix.c	Wed Jul 24 04:46:29 2002 +0000
+++ b/src/process-unix.c	Thu Jul 25 00:23:46 2002 +0000
@@ -1023,6 +1023,19 @@
   retry_close (out);
   retry_close (err);
 
+  /* I can't think of any reason why child processes need any more
+     than the standard 3 file descriptors.  It would be cleaner to
+     close just the ones that need to be, but the following brute
+     force approach is certainly effective, and not too slow.
+
+     #### Who the hell added this?  We already close the descriptors
+     by using close_process_descs()!!! --ben */
+  {
+    int fd;
+    for (fd = 3; fd <= 64; fd++)
+      retry_close (fd);
+  }
+
   /* we've wrapped execve; it translates its arguments */
   qxe_execve (new_argv[0], new_argv, env);
 
@@ -1127,10 +1140,6 @@
 	int xforkout = forkout;
 	int xforkerr = forkerr;
 
-	/* Checking for quit in the child is bad because that will 
-	   cause I/O, and that, in turn, can confuse the X connection. */
-	begin_dont_check_for_quit();
-
 	/* Disconnect the current controlling terminal, pursuant to
 	   making the pty be the controlling terminal of the process.
 	   Also put us in our own process group. */