comparison src/process-unix.c @ 859:84762348c6f9

[xemacs-hg @ 2002-06-01 08:06:46 by ben] fix process problems etc. process.el: Insert before, not after, point. buffer.c: Fix bug noted by someone. console-tty.h, device.h, emacs.c, filelock.c, nt.c, process-nt.c, process-unix.c, process.c, redisplay-tty.c, sysdep.c, sysproc.h, win32.c: Redo problem with syssignal.h/sysproc.h dependence noted by Didier -- rather than require one included before the other (error-prone), just include syssignal.h from sysproc.h where it's needed. inline.c: Include sysfile.h due to inline funs in that header. extents.c: Fix bug noted by Andrew Cohen <cohen@andy.bu.edu>. process-unix.c: Fix other bug noted by Andrew Cohen <cohen@andy.bu.edu>. process.c: Add process-has-separate-stderr-p, used by call-process-internal.
author ben
date Sat, 01 Jun 2002 08:06:55 +0000
parents 211050afdc9a
children 804517e16990
comparison
equal deleted inserted replaced
858:2c12fe2da451 859:84762348c6f9
51 #include "file-coding.h" 51 #include "file-coding.h"
52 52
53 #include <setjmp.h> 53 #include <setjmp.h>
54 #include "sysdir.h" 54 #include "sysdir.h"
55 #include "sysfile.h" 55 #include "sysfile.h"
56 #include "syssignal.h" /* Always include before systty.h and sysproc.h
57 -- didier*/
58 #include "sysproc.h" 56 #include "sysproc.h"
57 #include "syssignal.h"
59 #include "systime.h" 58 #include "systime.h"
60 #include "systty.h" 59 #include "systty.h"
61 #include "syswait.h" 60 #include "syswait.h"
62 61
63 #ifdef HPUX 62 #ifdef HPUX
2032 #endif 2031 #endif
2033 can_break_system_calls = 0; 2032 can_break_system_calls = 0;
2034 if (retval == -1 && errno != EISCONN) 2033 if (retval == -1 && errno != EISCONN)
2035 { 2034 {
2036 xerrno = errno; 2035 xerrno = errno;
2037 if (errno == EINTR) 2036
2037 if (errno == EINTR || errno == EINPROGRESS || errno == EALREADY)
2038 goto loop; 2038 goto loop;
2039 if (errno == EADDRINUSE && retry < 20) 2039 if (errno == EADDRINUSE && retry < 20)
2040 { 2040 {
2041 #ifdef __FreeBSD__ 2041 #ifdef __FreeBSD__
2042 /* A delay here is needed on some FreeBSD systems, 2042 /* A delay here is needed on some FreeBSD systems,
2260 can_break_system_calls = 0; 2260 can_break_system_calls = 0;
2261 if (ret == -1 && errno != EISCONN) 2261 if (ret == -1 && errno != EISCONN)
2262 { 2262 {
2263 int xerrno = errno; 2263 int xerrno = errno;
2264 2264
2265 if (errno == EINTR) 2265 if (errno == EINTR || errno == EINPROGRESS || errno == EALREADY)
2266 goto loop; 2266 goto loop;
2267 if (errno == EADDRINUSE && retry < 20) 2267 if (errno == EADDRINUSE && retry < 20)
2268 { 2268 {
2269 #ifdef __FreeBSD__
2269 /* A delay here is needed on some FreeBSD systems, 2270 /* A delay here is needed on some FreeBSD systems,
2270 and it is harmless, since this retrying takes time anyway 2271 and it is harmless, since this retrying takes time anyway
2271 and should be infrequent. 2272 and should be infrequent.
2272 `sleep-for' allowed for quitting this loop with interrupts 2273 `sleep-for' allowed for quitting this loop with interrupts
2273 slowed down so it can't be used here. Async timers should 2274 slowed down so it can't be used here. Async timers should
2274 already be disabled at this point so we can use `sleep'. */ 2275 already be disabled at this point so we can use `sleep'. */
2275 sleep (1); 2276 sleep (1);
2277 #endif
2276 retry++; 2278 retry++;
2277 goto loop; 2279 goto loop;
2278 } 2280 }
2279 2281
2280 retry_close (rs); 2282 retry_close (rs);