aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/process.c b/src/process.c
index 3fe8644b48a..2800fa58340 100644
--- a/src/process.c
+++ b/src/process.c
@@ -195,24 +195,15 @@ static EMACS_INT process_tick;
195/* Number of events for which the user or sentinel has been notified. */ 195/* Number of events for which the user or sentinel has been notified. */
196static EMACS_INT update_tick; 196static EMACS_INT update_tick;
197 197
198/* Define NON_BLOCKING_CONNECT if we can support non-blocking connects. */ 198/* Define NON_BLOCKING_CONNECT if we can support non-blocking connects.
199 The code can be simplified by assuming NON_BLOCKING_CONNECT once
200 Emacs starts assuming POSIX 1003.1-2001 or later. */
199 201
200/* Only W32 has this, it really means that select can't take write mask. */ 202#if (defined HAVE_SELECT \
201#ifdef BROKEN_NON_BLOCKING_CONNECT 203 && (defined GNU_LINUX || defined HAVE_GETPEERNAME) \
202#undef NON_BLOCKING_CONNECT 204 && (defined EWOULDBLOCK || defined EINPROGRESS))
203enum { SELECT_CAN_DO_WRITE_MASK = false }; 205# define NON_BLOCKING_CONNECT
204#else 206#endif
205enum { SELECT_CAN_DO_WRITE_MASK = true };
206#ifndef NON_BLOCKING_CONNECT
207#ifdef HAVE_SELECT
208#if defined (HAVE_GETPEERNAME) || defined (GNU_LINUX)
209#if defined (EWOULDBLOCK) || defined (EINPROGRESS)
210#define NON_BLOCKING_CONNECT
211#endif /* EWOULDBLOCK || EINPROGRESS */
212#endif /* HAVE_GETPEERNAME || GNU_LINUX */
213#endif /* HAVE_SELECT */
214#endif /* NON_BLOCKING_CONNECT */
215#endif /* BROKEN_NON_BLOCKING_CONNECT */
216 207
217/* Define DATAGRAM_SOCKETS if datagrams can be used safely on 208/* Define DATAGRAM_SOCKETS if datagrams can be used safely on
218 this system. We need to read full packets, so we need a 209 this system. We need to read full packets, so we need a
@@ -4606,7 +4597,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd,
4606 Available = input_wait_mask; 4597 Available = input_wait_mask;
4607 Writeok = write_mask; 4598 Writeok = write_mask;
4608 check_delay = wait_proc ? 0 : process_output_delay_count; 4599 check_delay = wait_proc ? 0 : process_output_delay_count;
4609 check_write = SELECT_CAN_DO_WRITE_MASK; 4600 check_write = true;
4610 } 4601 }
4611 4602
4612 /* If frame size has changed or the window is newly mapped, 4603 /* If frame size has changed or the window is newly mapped,