Mercurial > hg > xemacs-beta
comparison src/process-unix.c @ 1015:3d3204656cb4
[xemacs-hg @ 2002-09-24 14:59:22 by michaels]
2002-09-22 Mike Sperber <mike@xemacs.org>
* specifier.c (specifier_add_spec): Don't do anything if NILP
(inst_list)---otherwise, assertions in the rest of the specifier
code get violated.
2002-09-20 Mike Sperber <mike@xemacs.org>
(This partially gets back my patch from 2002-07-20 without the
bug.)
* process-unix.c (child_setup): Remove Ben's comment noting
confusion over the file descriptors >= 3: close_process_descs()
doesn't close all. Fix fd range to go up to MAXDESC-1 instead
of 64.
(unix_create_process): Call begin_dont_check_for_quit to inhibit
unwanted interaction (and thus breaking of X event synchronicity)
in the child.
author | michaels |
---|---|
date | Tue, 24 Sep 2002 14:59:25 +0000 |
parents | 025200a2163c |
children | 184461bc8de4 |
comparison
equal
deleted
inserted
replaced
1014:deaf6c4f5a1c | 1015:3d3204656cb4 |
---|---|
1022 | 1022 |
1023 retry_close (in); | 1023 retry_close (in); |
1024 retry_close (out); | 1024 retry_close (out); |
1025 retry_close (err); | 1025 retry_close (err); |
1026 | 1026 |
1027 /* I can't think of any reason why child processes need any more | 1027 /* Close non-process-related file descriptors. It would be cleaner to |
1028 than the standard 3 file descriptors. It would be cleaner to | |
1029 close just the ones that need to be, but the following brute | 1028 close just the ones that need to be, but the following brute |
1030 force approach is certainly effective, and not too slow. | 1029 force approach is certainly effective, and not too slow. */ |
1031 | 1030 |
1032 #### Who the hell added this? We already close the descriptors | |
1033 by using close_process_descs()!!! --ben */ | |
1034 { | 1031 { |
1035 int fd; | 1032 int fd; |
1036 for (fd = 3; fd <= 64; fd++) | 1033 |
1034 for (fd = 3; fd < MAXDESC; fd++) | |
1037 retry_close (fd); | 1035 retry_close (fd); |
1038 } | 1036 } |
1039 | 1037 |
1040 /* we've wrapped execve; it translates its arguments */ | 1038 /* we've wrapped execve; it translates its arguments */ |
1041 qxe_execve (new_argv[0], new_argv, env); | 1039 qxe_execve (new_argv[0], new_argv, env); |
1138 { | 1136 { |
1139 /**** Now we're in the child process ****/ | 1137 /**** Now we're in the child process ****/ |
1140 int xforkin = forkin; | 1138 int xforkin = forkin; |
1141 int xforkout = forkout; | 1139 int xforkout = forkout; |
1142 int xforkerr = forkerr; | 1140 int xforkerr = forkerr; |
1141 | |
1142 /* Checking for quit in the child is bad because that will | |
1143 cause I/O, and that, in turn, can confuse the X connection. */ | |
1144 begin_dont_check_for_quit(); | |
1143 | 1145 |
1144 /* Disconnect the current controlling terminal, pursuant to | 1146 /* Disconnect the current controlling terminal, pursuant to |
1145 making the pty be the controlling terminal of the process. | 1147 making the pty be the controlling terminal of the process. |
1146 Also put us in our own process group. */ | 1148 Also put us in our own process group. */ |
1147 | 1149 |