From 82d6e50bf5113823f9839939b511fbbac8cb66f4 Mon Sep 17 00:00:00 2001 From: Jan D Date: Sun, 26 Sep 2010 22:48:13 +0200 Subject: [PATCH] =?utf8?q?Don=C3=A4t=20give=20write=5Fmask=20to=20select?= =?utf8?q?=20for=20W32.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit process.c (wait_reading_process_output): Don't pass write_mask to select if SELECT_CANT_DO_WRITE_MASK is defined. (SELECT_CANT_DO_WRITE_MASK): Define if SELECT_CANT_DO_WRITE_MASK. --- src/ChangeLog | 3 +++ src/process.c | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index 335938916cf..75cb5704059 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -2,6 +2,9 @@ * process.c (add_keyboard_wait_descriptor) (delete_keyboard_wait_descriptor): Reinstate ifdef subprocesses. + (wait_reading_process_output): Don't pass write_mask to select + if SELECT_CANT_DO_WRITE_MASK is defined. + (SELECT_CANT_DO_WRITE_MASK): Define if SELECT_CANT_DO_WRITE_MASK. * process.h (add_read_fd, delete_read_fd, add_write_fd) (delete_write_fd): Declare. diff --git a/src/process.c b/src/process.c index d29168bcfd1..70cc8250add 100644 --- a/src/process.c +++ b/src/process.c @@ -201,8 +201,10 @@ int update_tick; /* Define NON_BLOCKING_CONNECT if we can support non-blocking connects. */ +/* Only W32 has this, it really means that select can't take write mask. */ #ifdef BROKEN_NON_BLOCKING_CONNECT #undef NON_BLOCKING_CONNECT +#define SELECT_CANT_DO_WRITE_MASK #else #ifndef NON_BLOCKING_CONNECT #ifdef HAVE_SELECT @@ -4726,7 +4728,11 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd, else Available = input_wait_mask; Writeok = write_mask; +#ifdef SELECT_CANT_DO_WRITE_MASK + check_write = 0; +#else check_write = 1; +#endif check_delay = wait_channel >= 0 ? 0 : process_output_delay_count; } -- 2.39.5