From 927e08bef8a8053157822b36a34a8d6c401631ee Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Mon, 9 Oct 1995 00:31:24 +0000 Subject: [PATCH] (exec_sentinel, read_process_output): Call record_asynch_buffer_change only if caller is reading kbd input. --- src/process.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/process.c b/src/process.c index 438f6e21e4c..9862bb30e85 100644 --- a/src/process.c +++ b/src/process.c @@ -2393,7 +2393,11 @@ read_process_output (proc, channel) if (! EQ (Fcurrent_buffer (), obuffer) || ! EQ (current_buffer->keymap, okeymap)) #endif - record_asynch_buffer_change (); + /* But do it only if the caller is actually going to read events. + Otherwise there's no need to make him wake up, and it could + cause trouble (for example it would make Fsit_for return). */ + if (waiting_for_user_input_p == -1) + record_asynch_buffer_change (); #ifdef VMS start_vms_process_read (vs); @@ -3391,7 +3395,11 @@ exec_sentinel (proc, reason) if (! EQ (Fcurrent_buffer (), obuffer) || ! EQ (current_buffer->keymap, okeymap)) #endif - record_asynch_buffer_change (); + /* But do it only if the caller is actually going to read events. + Otherwise there's no need to make him wake up, and it could + cause trouble (for example it would make Fsit_for return). */ + if (waiting_for_user_input_p == -1) + record_asynch_buffer_change (); unbind_to (count, Qnil); } -- 2.39.2