comparison 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
comparison
equal deleted inserted replaced
931:3508e2f71814 932:5c7570514cc5
1021 1021
1022 retry_close (in); 1022 retry_close (in);
1023 retry_close (out); 1023 retry_close (out);
1024 retry_close (err); 1024 retry_close (err);
1025 1025
1026 /* I can't think of any reason why child processes need any more
1027 than the standard 3 file descriptors. It would be cleaner to
1028 close just the ones that need to be, but the following brute
1029 force approach is certainly effective, and not too slow.
1030
1031 #### Who the hell added this? We already close the descriptors
1032 by using close_process_descs()!!! --ben */
1033 {
1034 int fd;
1035 for (fd = 3; fd <= 64; fd++)
1036 retry_close (fd);
1037 }
1038
1026 /* we've wrapped execve; it translates its arguments */ 1039 /* we've wrapped execve; it translates its arguments */
1027 qxe_execve (new_argv[0], new_argv, env); 1040 qxe_execve (new_argv[0], new_argv, env);
1028 1041
1029 stdout_out ("Can't exec program %s\n", new_argv[0]); 1042 stdout_out ("Can't exec program %s\n", new_argv[0]);
1030 _exit (1); 1043 _exit (1);
1124 { 1137 {
1125 /**** Now we're in the child process ****/ 1138 /**** Now we're in the child process ****/
1126 int xforkin = forkin; 1139 int xforkin = forkin;
1127 int xforkout = forkout; 1140 int xforkout = forkout;
1128 int xforkerr = forkerr; 1141 int xforkerr = forkerr;
1129
1130 /* Checking for quit in the child is bad because that will
1131 cause I/O, and that, in turn, can confuse the X connection. */
1132 begin_dont_check_for_quit();
1133 1142
1134 /* Disconnect the current controlling terminal, pursuant to 1143 /* Disconnect the current controlling terminal, pursuant to
1135 making the pty be the controlling terminal of the process. 1144 making the pty be the controlling terminal of the process.
1136 Also put us in our own process group. */ 1145 Also put us in our own process group. */
1137 1146