From unknown Tue Jun 24 05:07:57 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#20978 <20978@debbugs.gnu.org> To: bug#20978 <20978@debbugs.gnu.org> Subject: Status: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes Reply-To: bug#20978 <20978@debbugs.gnu.org> Date: Tue, 24 Jun 2025 12:07:57 +0000 retitle 20978 25.0.50; [PATCH 0/7] Emacs can return too fast when reading f= rom any processes reassign 20978 emacs submitter 20978 Ian Kelling severity 20978 normal tag 20978 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:34:56 2015 Received: (at submit) by debbugs.gnu.org; 4 Jul 2015 12:34:56 +0000 Received: from localhost ([127.0.0.1]:39334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMel-0001zH-Hb for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:34:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:45924) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMei-0001z1-Cc for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:34:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBMeb-0002GP-Mx for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:34:47 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBMeb-0002GJ-Jn for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:34:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBMea-0003H2-7u for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 08:34:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZBMeW-0002Bi-Tz for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 08:34:44 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZBMeW-0002BJ-KO for bug-gnu-emacs@gnu.org; Sat, 04 Jul 2015 08:34:40 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E9DAC21578; Sat, 4 Jul 2015 08:34:39 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute6.internal (MEProxy); Sat, 04 Jul 2015 08:34:39 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=QiXI+PhaeOy/87lMW0bMZSMMZKs =; b=WMhhUhD0XGUC9pIuj4nlcMcIynwKNxrMp6QCmwS+46OxP86/ZLejoHM3YU1 l09y7BNjXNJifVAs2ZERUYMNDRv/Nk6NgL9or28EdrjNGjjf1ku3g4Q790FqYq0t QVCzlfzUTJkcrK8beQKs1X4MwFmd8rGXewQP/fNlREr1mZLc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Qi XI+PhaeOy/87lMW0bMZSMMZKs=; b=I3GDmuE0bShZcVTLajBJe4hczwy6DZ7aLl tWJ303MjNPLb11A1uKywtDPw9/ZDYQ/YgxK4kTJl6A24ujcH49lUyugQgq4YIlZC Zh3MI9YXgC9D2ccVnTwMPCh/3CVcqromoFAqZBORoZG2ORRsFut9/98FOV0GPLHU rt0zv7IDM= X-Sasl-enc: NdcgbFm9EuVbf0oMqwPvq5fReQd8I5bgo7xEiFZWh4PM 1436013279 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 836E768013E for ; Sat, 4 Jul 2015 08:34:39 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id 882F71FE26; Sat, 4 Jul 2015 05:34:33 -0700 (PDT) From: Ian Kelling To: bug-gnu-emacs@gnu.org Subject: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes Date: Sat, 04 Jul 2015 05:34:33 -0700 Message-ID: <87zj3ckso6.fsf@iankelling.org> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) In GNU Emacs 25.0.50.63 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8) of 2015-07-04 Repository revision: 5c36788e76b22587e554960ed837f724473597a9 Windowing system distributor `The X.Org Foundation', version 11.0.11501000 System Description: Ubuntu 14.04.2 LTS Configured using: `configure 'CFLAGS=-O0 -g3'' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 Overview: The patch for debbugs:17647 causes emacs to return too fast sometimes when reading from any processes. It made adaptive read buffering be mostly dead code and caused readline-complete package to break. Instead, limit timeout less aggressively. Reproducing the problem: emacs -Q -l repro.el ;; repro.el (progn (setq explicit-bash-args '("--norc")) (setenv "EMACS" "") (setq comint-process-echoes t) (shell) (let* ((proc (get-buffer-process (current-buffer))) (filter-orig (process-filter proc)) accumulated-output) (process-send-string proc "stty echo\n") (set-process-query-on-exit-flag proc nil) (dotimes (unused 10) (sleep-for .05)) (set-process-filter proc (lambda (proc string) (push (list string) accumulated-output))) (process-send-string proc "echo a bit of text for testing\n") (dotimes (unused 100) (sleep-for .03)) (message "waiting for any process: %s" (reverse accumulated-output)) (switch-to-buffer "*Messages*") nil)) Output without my patches: waiting for any process: ((ech) (o a ) (bi) (t ) (o) (f ) (t) (e) (x) (t) ( ) (f) (o) (r) ( ) (t) (e) (s) (t) (i) (n) (g) ( ) (a bit of text for testing ) (bash-4.3$ )) Output with my patches (also the same same output as before the debbugs:17647 patch, aka git 05d2821): waiting for any process: ((ec) (ho a bit of text for testing a bit of text for testing bash-4.3$ )) Background: The 17647 patch had a few things bundled in and the root problem and fix was not documented. The problem was that we got output, and we subsequently got a pselect of 0, but we have set timeout_reduced_for_timers, so we don't break when we should. This is the relevant condition: if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers) break; This was fixed by setting the timeout to 0 if we've attempted to read process output. However, that was too big a hammer. What we actually want is what the original code tried to do, but had some logic problems: read data, and stop if there is no more to read in a reasonable amount of time or we've reached the requested timeout. There is a reference to someone else having this issue as well, without figuring out anything about it http://lists.gnu.org/archive/html/bug-gnu-emacs/2014-06/msg00958.html And there is a resulting workaround in flymake-tests.el. About the patches: The first 4 are refactoring and not necessarily dependent on any others, but independent patches would conflict and they make the code clearer so I included them. I can separate any of them if needed. Patch 3 depends on the patch for debbugs:20976, which is a simple fix and I expect no problem for it be applied first. I was careful to not squash unrelated changes as the function is rather complicated and I could have saved a fair amount of time if there weren't unrelated changes in the patch that introduced this bug. The last 2 patches are probably easier to understand squashed together, but the last one one fixes a different avenue for the same bug to manifest (SIGIO), which I haven't tried to reproduce, and includes more circumstances (reading from a specific process and before we've gotten any output), and I'm not sure if some code might depend on it's behavior so I broke it out. Make check succeeds on all the patches. Ian Kelling (7): ; Minor cleanup of wait_reading_process_output ; Remove ADAPTIVE_READ_BUFFERING ifdef ; Rename local var to match function name ; Rename local var nsecs to adaptive_nsecs : Refactor timeouts in wait_reading_process_output Don't return as fast reading any process output Avoid returning early reading process output due to SIGIO src/process.c | 211 +++++++++++++++++++++++++++------------------------------- 1 file changed, 98 insertions(+), 113 deletions(-) -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:37:45 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:37:45 +0000 Received: from localhost ([127.0.0.1]:39354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMhV-000254-46 for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:37:45 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:52720) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMhS-00024s-I9 for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:37:43 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4FAAC20151; Sat, 4 Jul 2015 08:37:41 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute5.internal (MEProxy); Sat, 04 Jul 2015 08:37:41 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=DzFiOubCigoDkOYnCJyJdv4t31w =; b=O6+EaUWNR1pz7uYjpUBsOO2twxtZU0PLwz03OvbbKE/o217cUxaBmXvChpC cAMrqjj/xqjTitRHQyUyMAGVlgX/XVCnwfMmVr+ojg1s64Acxl5/VUI+3C74ay3r K9UnndeaaQo1yC04oruoawpcQdsTmCsXibA0jdvA4BmYKKf0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Dz FiOubCigoDkOYnCJyJdv4t31w=; b=J/zvu3VfpzXRpCeFeYI2+Gcg2lKDYReXkd mxsyHqhZb0ny7Pwo/LYrZ9ElzBjRgeaTqHJkPaCP+7PJIJCtMAX7DiB4OF4xcwxT vlcg0ebrngiEL/9aIYw0dvVKA/y2m6b5o/Ghkj+u3uiXvqzKThsGENN507T1Z8Zi OnsZ+PkZs= X-Sasl-enc: DDG6fRjjmQm/xn7dEwMHrxT7tRhS0BcPdsavBCe7YO3o 1436013460 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id CA8DA680140 for <20978@debbugs.gnu.org>; Sat, 4 Jul 2015 08:37:40 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id D59C11FE26; Sat, 4 Jul 2015 05:37:34 -0700 (PDT) From: Ian Kelling To: 20978@debbugs.gnu.org Subject: [PATCH 1/7] ; Minor cleanup of wait_reading_process_output Date: Sat, 04 Jul 2015 05:37:34 -0700 Message-ID: <874mlkksj5.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * src/process.c (wait_reading_process_output): simplify logic, fix dos version comments diff --git a/src/process.c b/src/process.c index 5272792..191f617 100644 --- a/src/process.c +++ b/src/process.c @@ -4873,8 +4873,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, no_avail = 1; FD_ZERO (&Available); } - - if (!no_avail) + else { #ifdef ADAPTIVE_READ_BUFFERING @@ -6965,9 +6964,7 @@ extern int sys_select (int, fd_set *, fd_set *, fd_set *, DO_DISPLAY means redisplay should be done to show subprocess output that arrives. - Return positive if we received input from WAIT_PROC (or from any - process if WAIT_PROC is null), zero if we attempted to receive - input but got none, and negative if we didn't even try. */ + Returns -1 signifying we got no output and did not try. */ int wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:40:18 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:40:18 +0000 Received: from localhost ([127.0.0.1]:39358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMjx-00029a-2S for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:40:18 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:53884) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMju-00029S-GD for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:40:15 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4B86920B67; Sat, 4 Jul 2015 08:40:14 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 04 Jul 2015 08:40:14 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=STF/2Ly4ft6Khn/6D7YEqVZNAvo =; b=CVm4lCQK+GtnszIY+0Ul0ueYWuGVJNgubCIhmPnaWN2srJ9Yb7+EGJVBTz2 a7f6S0YJuWlyNh3na8SHSa7f34VZiVsQjxSWQdeCMFMhREBDFrwODFWfjNfXlBx8 3zuRVJjlUb/VhkJOv30+C232hDTIVWhwzO7PL0MYb8L+fqAs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=ST F/2Ly4ft6Khn/6D7YEqVZNAvo=; b=JJ6gz8/wg2T8ZviJVSqAMQshaPyHOZt7uY TSiJWxo/J1fpgCXzUcM+obAoZraH/kwpprGg3H9g/VMnBF53YaFohkZJX3/eZQEO Hh9XfbHPzSKdAKw39OL/mmcOW9KFj3co/UZg6XcmI7vN97m+DhG04jTTuhIym6Ed pv579hL4E= X-Sasl-enc: rZFUWGULZV8P6KnX8crSpJOzA3GwJv8pCmf8JYxAav6I 1436013613 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id DDB9BC00288 for <20978@debbugs.gnu.org>; Sat, 4 Jul 2015 08:40:13 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id EB5131FE26; Sat, 4 Jul 2015 05:40:07 -0700 (PDT) From: Ian Kelling To: 20978@debbugs.gnu.org Subject: [PATCH 2/7] ; Remove ADAPTIVE_READ_BUFFERING ifdef Date: Sat, 04 Jul 2015 05:40:07 -0700 Message-ID: <87twtkjdug.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * src/process.c (make-process, make-pipe-process, deactivate_process) (wait_reading_process_output, read_process_output, send_process) (init_process_emacs): ifdef ADAPTIVE_READ_BUFFERING was originally added in case there was an operating system in which it was not useful. That was 11 years ago and it hasn't happened. Make development easier by not considering the effect of changes on a theoretical OS where this is disabled. diff --git a/src/process.c b/src/process.c index 191f617..1541de2 100644 --- a/src/process.c +++ b/src/process.c @@ -224,11 +224,6 @@ static EMACS_INT update_tick; # define HAVE_SEQPACKET #endif -#if !defined (ADAPTIVE_READ_BUFFERING) && !defined (NO_ADAPTIVE_READ_BUFFERING) -#define ADAPTIVE_READ_BUFFERING -#endif - -#ifdef ADAPTIVE_READ_BUFFERING #define READ_OUTPUT_DELAY_INCREMENT (TIMESPEC_RESOLUTION / 100) #define READ_OUTPUT_DELAY_MAX (READ_OUTPUT_DELAY_INCREMENT * 5) #define READ_OUTPUT_DELAY_MAX_MAX (READ_OUTPUT_DELAY_INCREMENT * 7) @@ -242,10 +237,6 @@ static int process_output_delay_count; static bool process_output_skip; -#else -#define process_output_delay_count 0 -#endif - static void create_process (Lisp_Object, char **, Lisp_Object); #ifdef USABLE_SIGIO static bool keyboard_bit_set (fd_set *); @@ -1517,11 +1508,9 @@ usage: (make-process &rest ARGS) */) pset_gnutls_cred_type (XPROCESS (proc), Qnil); #endif -#ifdef ADAPTIVE_READ_BUFFERING XPROCESS (proc)->adaptive_read_buffering = (NILP (Vprocess_adaptive_read_buffering) ? 0 : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2); -#endif /* Make the process marker point into the process buffer (if any). */ if (BUFFERP (buffer)) @@ -2184,11 +2173,9 @@ usage: (make-pipe-process &rest ARGS) */) FD_SET (inchannel, &input_wait_mask); FD_SET (inchannel, &non_keyboard_wait_mask); } -#ifdef ADAPTIVE_READ_BUFFERING p->adaptive_read_buffering = (NILP (Vprocess_adaptive_read_buffering) ? 0 : EQ (Vprocess_adaptive_read_buffering, Qt) ? 1 : 2); -#endif /* Make the process marker point into the process buffer (if any). */ if (BUFFERP (buffer)) @@ -4183,7 +4170,6 @@ deactivate_process (Lisp_Object proc) emacs_gnutls_deinit (proc); #endif /* HAVE_GNUTLS */ -#ifdef ADAPTIVE_READ_BUFFERING if (p->read_output_delay > 0) { if (--process_output_delay_count < 0) @@ -4191,7 +4177,6 @@ deactivate_process (Lisp_Object proc) p->read_output_delay = 0; p->read_output_skip = 0; } -#endif /* Beware SIGCHLD hereabouts. */ @@ -4876,7 +4861,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, else { -#ifdef ADAPTIVE_READ_BUFFERING /* Set the timeout for adaptive read buffering if any process has non-zero read_output_skip and non-zero read_output_delay, and we are not reading output for a @@ -4908,7 +4892,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, timeout = make_timespec (0, nsecs); process_output_skip = 0; } -#endif #if defined (HAVE_NS) nfds = ns_select @@ -5345,7 +5328,6 @@ read_process_output (Lisp_Object proc, int channel) #endif nbytes = emacs_read (channel, chars + carryover + buffered, readmax - buffered); -#ifdef ADAPTIVE_READ_BUFFERING if (nbytes > 0 && p->adaptive_read_buffering) { int delay = p->read_output_delay; @@ -5371,7 +5353,6 @@ read_process_output (Lisp_Object proc, int channel) process_output_skip = 1; } } -#endif nbytes += buffered; nbytes += buffered && nbytes <= 0; } @@ -5840,7 +5821,6 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len, #endif written = emacs_write_sig (outfd, cur_buf, cur_len); rv = (written ? 0 : -1); -#ifdef ADAPTIVE_READ_BUFFERING if (p->read_output_delay > 0 && p->adaptive_read_buffering == 1) { @@ -5848,7 +5828,6 @@ send_process (Lisp_Object proc, const char *buf, ptrdiff_t len, process_output_delay_count--; p->read_output_skip = 0; } -#endif } if (rv < 0) @@ -7470,10 +7449,8 @@ init_process_emacs (void) num_pending_connects = 0; #endif -#ifdef ADAPTIVE_READ_BUFFERING process_output_delay_count = 0; process_output_skip = 0; -#endif /* Don't do this, it caused infinite select loops. The display method should call add_keyboard_wait_descriptor on stdin if it @@ -7638,7 +7615,6 @@ then a pipe is used in any case. The value takes effect when `start-process' is called. */); Vprocess_connection_type = Qt; -#ifdef ADAPTIVE_READ_BUFFERING DEFVAR_LISP ("process-adaptive-read-buffering", Vprocess_adaptive_read_buffering, doc: /* If non-nil, improve receive buffering by delaying after short reads. On some systems, when Emacs reads the output from a subprocess, the output data @@ -7650,7 +7626,6 @@ If the value is t, the delay is reset after each write to the process; any other non-nil value means that the delay is not reset on write. The variable takes effect when `start-process' is called. */); Vprocess_adaptive_read_buffering = Qt; -#endif defsubr (&Sprocessp); defsubr (&Sget_process); -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:42:23 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:42:23 +0000 Received: from localhost ([127.0.0.1]:39362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMly-0002DG-Fs for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:42:23 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:38514) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMlx-0002D9-8N for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:42:21 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 07CD021B36; Sat, 4 Jul 2015 08:42:21 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Sat, 04 Jul 2015 08:42:21 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=vwUlS1UhBT7CsyZbMtuOaY3u9uE =; b=hGoYs2CM7kRidDRplFSUUa1wW2x/69JnSzytUW9BUOu78oZKSd76Etsvl3X mmag3gTTWgkkFtWgQkePkZGJb1WTlgIuZoANCnfCLg+MVBMpFh1CGwzvR6A+UWBP PhH0BgZV1Yx6dmucj6N4WCFC9IGcJI16BCoopRnuxnyjPkfQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=vw UlS1UhBT7CsyZbMtuOaY3u9uE=; b=pMIrMYAJPKWv8YyE6t96SB7ObehvX9Zh/5 Aa6R+GqK4x8eN2OkBM6I1mQDuwX1xTNZmsmwoEhvq+mG+PaNPpwasP3anSZUOZ19 zWXhtrWLzRpJN+3SsttUczo9dYKQPNCRtmXYzrxr2Z0oQR9M38kx1RhImL0IUHrE cGp6zvgTg= X-Sasl-enc: Hrqp+59FjqK5g5CJ6QL+F/QKDubAQIU2myJUHvegScdr 1436013740 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id A0A45C0028A for <20978@debbugs.gnu.org>; Sat, 4 Jul 2015 08:42:20 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id AF0581FE26; Sat, 4 Jul 2015 05:42:14 -0700 (PDT) From: Ian Kelling To: 20978@debbugs.gnu.org Subject: [PATCH 3/7] ; Rename local var to match function name Date: Sat, 04 Jul 2015 05:42:14 -0700 Message-ID: <87lhewjdqx.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * src/process.c (wait_reading_process_output, status_notify): Previously the function wait_reading_process_input was renamed to the more logical wait_reading_process_output. Make it's local variables consistent with that change. diff --git a/src/process.c b/src/process.c index 1541de2..d5569d4 100644 --- a/src/process.c +++ b/src/process.c @@ -4586,7 +4586,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, int xerrno; Lisp_Object proc; struct timespec timeout, end_time; - int got_some_input = -1; + int got_some_output = -1; ptrdiff_t count = SPECPDL_INDEX (); FD_ZERO (&Available); @@ -4634,7 +4634,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, break; /* After reading input, vacuum up any leftovers without waiting. */ - if (0 <= got_some_input) + if (0 <= got_some_output) nsecs = -1; /* Compute time from now till when time limit is up. */ @@ -4755,7 +4755,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, /* It's okay for us to do this and then continue with the loop, since timeout has already been zeroed out. */ clear_waiting_for_input (); - got_some_input = status_notify (NULL, wait_proc); + got_some_output = status_notify (NULL, wait_proc); if (do_display) redisplay_preserve_echo_area (13); } } @@ -4791,8 +4791,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, } else { - if (got_some_input < nread) - got_some_input = nread; + if (got_some_output < nread) + got_some_output = nread; if (nread == 0) break; read_some_bytes = true; @@ -5089,8 +5089,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, buffered-ahead character if we have one. */ nread = read_process_output (proc, channel); - if ((!wait_proc || wait_proc == XPROCESS (proc)) && got_some_input < nread) - got_some_input = nread; + if ((!wait_proc || wait_proc == XPROCESS (proc)) && got_some_output < nread) + got_some_output = nread; if (nread > 0) { /* Since read_process_output can run a filter, @@ -5250,7 +5250,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, QUIT; } - return got_some_input; + return got_some_output; } /* Given a list (FUNCTION ARGS...), apply FUNCTION to the ARGS. */ @@ -6659,7 +6659,7 @@ status_notify (struct Lisp_Process *deleting_process, Lisp_Object proc; Lisp_Object tail, msg; struct gcpro gcpro1, gcpro2; - int got_some_input = -1; + int got_some_output = -1; tail = Qnil; msg = Qnil; @@ -6693,8 +6693,8 @@ status_notify (struct Lisp_Process *deleting_process, { int nread = read_process_output (proc, p->infd); if ((!wait_proc || wait_proc == XPROCESS (proc)) - && got_some_input < nread) - got_some_input = nread; + && got_some_output < nread) + got_some_output = nread; if (nread <= 0) break; } @@ -6729,7 +6729,7 @@ status_notify (struct Lisp_Process *deleting_process, update_mode_lines = 24; /* In case buffers use %s in mode-line-format. */ UNGCPRO; - return got_some_input; + return got_some_output; } DEFUN ("internal-default-process-sentinel", Finternal_default_process_sentinel, -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:43:31 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:43:31 +0000 Received: from localhost ([127.0.0.1]:39366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMn4-0002FM-IF for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:43:31 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:36896) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMn2-0002FD-BU for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:43:28 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 29AA7210DB; Sat, 4 Jul 2015 08:43:28 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sat, 04 Jul 2015 08:43:28 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=4lBwRCCWDQLa8FH/3s00xUOr73w =; b=qQrg7VG+L7pOnMKV758TMugQTP1iTXr07f5seHoMiLzLOftMO8OIPhslSxH BJ8FHJ6FkUAR+Yf/n9fdAeNl2sKm7Y09AC0kOKIAkp6tb7MKphiCX05QYpB5F2Dv fO2yliksdW8Of+njG492L7uqtGViGIoiLoBZZa2gCYc6XatY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=4l BwRCCWDQLa8FH/3s00xUOr73w=; b=Z9Sh7shFZmda38236ze2LoSiQc1uScohMr BClLZrm2CNQSvsngxaZ1zwt8cMBEqS5KwiuH1L2HylgmM1h3twnmHdHHgcKySK98 kORxMuWz3Dkuhq+5PgMMMsKDqEVe+JpkKD1zmFSilFMH1K2K20zGCZtZaw/ZAjqh M7iEwR2zY= X-Sasl-enc: HOjLRL8zdXoX+JLVrUIICJdrMJtMXRW3IH6JYM5Y+8Wi 1436013807 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id D98FCC00288 for <20978@debbugs.gnu.org>; Sat, 4 Jul 2015 08:43:27 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id E6A4E1FE26; Sat, 4 Jul 2015 05:43:21 -0700 (PDT) From: Ian Kelling To: 20978@debbugs.gnu.org Subject: [PATCH 4/7] ; Rename local var nsecs to adaptive_nsecs Date: Sat, 04 Jul 2015 05:43:21 -0700 Message-ID: <87d208jdp2.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * src/process.c (wait_reading_process_output): Rename inner nsecs to adaptive_nsecs. There is already an nsecs, and this function is confusing enough. diff --git a/src/process.c b/src/process.c index d5569d4..68a815f 100644 --- a/src/process.c +++ b/src/process.c @@ -4868,9 +4868,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, Vprocess_adaptive_read_buffering is nil. */ if (process_output_skip && check_delay > 0) { - int nsecs = timeout.tv_nsec; - if (timeout.tv_sec > 0 || nsecs > READ_OUTPUT_DELAY_MAX) - nsecs = READ_OUTPUT_DELAY_MAX; + int adaptive_nsecs = timeout.tv_nsec; + if (timeout.tv_sec > 0 || adaptive_nsecs > READ_OUTPUT_DELAY_MAX) + adaptive_nsecs = READ_OUTPUT_DELAY_MAX; for (channel = 0; check_delay > 0 && channel <= max_process_desc; channel++) { proc = chan_process[channel]; @@ -4885,11 +4885,11 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, continue; FD_CLR (channel, &Available); XPROCESS (proc)->read_output_skip = 0; - if (XPROCESS (proc)->read_output_delay < nsecs) - nsecs = XPROCESS (proc)->read_output_delay; + if (XPROCESS (proc)->read_output_delay < adaptive_nsecs) + adaptive_nsecs = XPROCESS (proc)->read_output_delay; } } - timeout = make_timespec (0, nsecs); + timeout = make_timespec (0, adaptive_nsecs); process_output_skip = 0; } -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:45:52 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:45:53 +0000 Received: from localhost ([127.0.0.1]:39370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMpL-0002Ji-Jd for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:45:52 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:59099) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMpH-0002JW-Uf for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:45:49 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 8EAA121162; Sat, 4 Jul 2015 08:45:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute3.internal (MEProxy); Sat, 04 Jul 2015 08:45:47 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=S+fEN6nckhN0x+IXatjQCTdJSls =; b=CdY8LVNJjYF6/ISRO5ozpVBfgJjh/1JTkg3jIW88VBDNy8HXgy3Z6ZBN2wK nDWLavgxmUPTFwCuH3HyTzKYTt9MJkMn9fNh8FfkhQ0tecPQwedLO3il9GR6XyiK jvlGVcReqpLaqf+Ni9SAwQbO9BXeoDhymzPuynNUmEb49EDc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=S+ fEN6nckhN0x+IXatjQCTdJSls=; b=Bbe22en0tMDZhV7GVH9AGJsRnGUrzGNO8a A12g5bhOXfKU/GuniOfsEd7R5FlXKrIcyF2SZan81KXrPrldmR6HwGTi3SYZuIvL TScN5Cr69HQhJj4Zu65JZkoqVd/uq8DBoCE4mlA6GB8Z/4XSTHP3g5GRTM+EzvqE jqBCRCNuQ= X-Sasl-enc: riZDJIcO6qqwFVLjLaDXqNGGhV9k2lNVqYm7d/Z/OCtM 1436013947 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 383B268014C for <20978@debbugs.gnu.org>; Sat, 4 Jul 2015 08:45:47 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id 446381FE26; Sat, 4 Jul 2015 05:45:41 -0700 (PDT) From: Ian Kelling To: 20978@debbugs.gnu.org Subject: [PATCH 5/7] : Refactor timeouts in wait_reading_process_output Date: Sat, 04 Jul 2015 05:45:41 -0700 Message-ID: <87zj3chz0q.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * src/process.c (wait_reading_process_output): Simplify timeouts with an enum. Remove a redundant condition. diff --git a/src/process.c b/src/process.c index 68a815f..538455c 100644 --- a/src/process.c +++ b/src/process.c @@ -4586,6 +4586,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, int xerrno; Lisp_Object proc; struct timespec timeout, end_time; + enum { MINIMUM, TIMEOUT, INFINITY } wait; int got_some_output = -1; ptrdiff_t count = SPECPDL_INDEX (); @@ -4601,21 +4602,19 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, waiting_for_user_input_p); waiting_for_user_input_p = read_kbd; - if (time_limit < 0) - { - time_limit = 0; - nsecs = -1; - } - else if (TYPE_MAXIMUM (time_t) < time_limit) + if (TYPE_MAXIMUM (time_t) < time_limit) time_limit = TYPE_MAXIMUM (time_t); - /* Since we may need to wait several times, - compute the absolute time to return at. */ - if (time_limit || nsecs > 0) + if (time_limit < 0 || nsecs < 0) + wait = MINIMUM; + else if (time_limit > 0 || nsecs > 0) { - timeout = make_timespec (time_limit, nsecs); - end_time = timespec_add (current_timespec (), timeout); + wait = TIMEOUT; + end_time = timespec_add (current_timespec (), + make_timespec (time_limit, nsecs)); } + else + wait = INFINITY; while (1) { @@ -4635,19 +4634,15 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, /* After reading input, vacuum up any leftovers without waiting. */ if (0 <= got_some_output) - nsecs = -1; + wait = MINIMUM; /* Compute time from now till when time limit is up. */ /* Exit if already run out. */ - if (nsecs < 0) + if (wait == MINIMUM) { - /* A negative timeout means - gobble output available now - but don't wait at all. */ - - timeout = make_timespec (0, 0); + timeout = make_timespec (0, 0); } - else if (time_limit || nsecs > 0) + else if (wait == TIMEOUT) { struct timespec now = current_timespec (); if (timespec_cmp (end_time, now) <= 0) @@ -4698,24 +4693,20 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, && requeued_events_pending_p ()) break; - /* A negative timeout means do not wait at all. */ - if (nsecs >= 0) - { - if (timespec_valid_p (timer_delay)) - { - if (timespec_cmp (timer_delay, timeout) < 0) - { - timeout = timer_delay; - timeout_reduced_for_timers = true; - } - } - else - { - /* This is so a breakpoint can be put here. */ - wait_reading_process_output_1 (); - } - } - } + if (timespec_valid_p (timer_delay)) + { + if (timespec_cmp (timer_delay, timeout) < 0) + { + timeout = timer_delay; + timeout_reduced_for_timers = true; + } + } + else + { + /* This is so a breakpoint can be put here. */ + wait_reading_process_output_1 (); + } + } /* Cause C-g and alarm signals to take immediate action, and cause input available signals to zero out timeout. @@ -4964,7 +4955,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, /* If we woke up due to SIGWINCH, actually change size now. */ do_pending_window_change (0); - if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers) + if (wait != INFINITY && nfds == 0 && ! timeout_reduced_for_timers) /* We waited the full specified time, so return now. */ break; if (nfds < 0) @@ -6953,21 +6944,21 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, { register int nfds; struct timespec end_time, timeout; + enum { MINIMUM, TIMEOUT, INFINITY } wait; - if (time_limit < 0) - { - time_limit = 0; - nsecs = -1; - } - else if (TYPE_MAXIMUM (time_t) < time_limit) + if (TYPE_MAXIMUM (time_t) < time_limit) time_limit = TYPE_MAXIMUM (time_t); - /* What does time_limit really mean? */ - if (time_limit || nsecs > 0) + if (time_limit < 0 || nsecs < 0) + wait = MINIMUM; + else if (time_limit > 0 || nsecs > 0) { - timeout = make_timespec (time_limit, nsecs); - end_time = timespec_add (current_timespec (), timeout); + wait = TIMEOUT; + end_time = timespec_add (current_timespec (), + make_timespec (time_limit, nsecs)); } + else + wait = INFINITY; /* Turn off periodic alarms (in case they are in use) and then turn off any other atimers, @@ -6993,15 +6984,11 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, /* Compute time from now till when time limit is up. */ /* Exit if already run out. */ - if (nsecs < 0) + if (wait == MINIMUM) { - /* A negative timeout means - gobble output available now - but don't wait at all. */ - - timeout = make_timespec (0, 0); + timeout = make_timespec (0, 0); } - else if (time_limit || nsecs > 0) + else if (wait == TIMEOUT) { struct timespec now = current_timespec (); if (timespec_cmp (end_time, now) <= 0) @@ -7039,7 +7026,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, && requeued_events_pending_p ()) break; - if (timespec_valid_p (timer_delay) && nsecs >= 0) + if (timespec_valid_p (timer_delay)) { if (timespec_cmp (timer_delay, timeout) < 0) { @@ -7083,7 +7070,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, /* If we woke up due to SIGWINCH, actually change size now. */ do_pending_window_change (0); - if ((time_limit || nsecs) && nfds == 0 && ! timeout_reduced_for_timers) + if (wait != INFINITY && nfds == 0 && ! timeout_reduced_for_timers) /* We waited the full specified time, so return now. */ break; -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:47:18 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:47:18 +0000 Received: from localhost ([127.0.0.1]:39374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMqj-0002Me-28 for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:47:17 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:35166) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMqg-0002MU-Ar for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:47:15 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 20C762171F; Sat, 4 Jul 2015 08:47:14 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Sat, 04 Jul 2015 08:47:14 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=rfBu8OVKxHHzUnEDzMGZysQCuHY =; b=sPCto4vyZlupDwGvvqwv5pnyAqhljPkbT/IZWfTbkBkwdMYrCpHhvMoAlE+ lVH3/RsBx3jSc7v/13bOeYgrpmeFIFQfHhndtAF2Cw60qfIxK0Uv/o95kWJKy9pl VNIPsOz9x4ckJWvBMvkNbp+Z+H7yPJ2pQcfu1iRibVaFzP40= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=rf Bu8OVKxHHzUnEDzMGZysQCuHY=; b=owtIeDPJ50OBOmDDg6rXEEckw2WRfN+l5z 5641tlXauNKX41hHDq0fM8mJL0KP3tyd9tEHCN3VWYmP4aPdYKFOdpMUFpscyCbq GINjKmWUO4nYpI4F6RdHeFQfRialh8JcWfIJy20imwG7IUKNjQHbvvgSoKA5NNIW S4yVM2IAo= X-Sasl-enc: hEDj8DprIxiKJz6zWa6feccxfmVUGSmDCU1+1XaOMcba 1436014033 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id B7815C0028A for <20978@debbugs.gnu.org>; Sat, 4 Jul 2015 08:47:13 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id B663E1FE26; Sat, 4 Jul 2015 05:47:07 -0700 (PDT) From: Ian Kelling To: 20978@debbugs.gnu.org Subject: [PATCH 6/7] Don't return as fast reading any process output Date: Sat, 04 Jul 2015 05:47:07 -0700 Message-ID: <87r3oohyyc.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * src/process.c (wait_reading_process_output): The patch for debbugs:17647 returns too fast sometimes when reading from any processes. Revert part of it, and limit the timeout more sensibly. diff --git a/src/process.c b/src/process.c index 538455c..cb48e5f 100644 --- a/src/process.c +++ b/src/process.c @@ -4585,7 +4585,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, bool no_avail; int xerrno; Lisp_Object proc; - struct timespec timeout, end_time; + struct timespec timeout, end_time, timer_delay; + struct timespec got_output_end_time = invalid_timespec (); enum { MINIMUM, TIMEOUT, INFINITY } wait; int got_some_output = -1; ptrdiff_t count = SPECPDL_INDEX (); @@ -4618,7 +4619,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, while (1) { - bool timeout_reduced_for_timers = false; + bool process_skipped = false; /* If calling from keyboard input, do not quit since we want to return C-g as an input character. @@ -4632,10 +4633,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (! NILP (wait_for_cell) && ! NILP (XCAR (wait_for_cell))) break; - /* After reading input, vacuum up any leftovers without waiting. */ - if (0 <= got_some_output) - wait = MINIMUM; - /* Compute time from now till when time limit is up. */ /* Exit if already run out. */ if (wait == MINIMUM) @@ -4661,8 +4658,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (NILP (wait_for_cell) && just_wait_proc >= 0) { - struct timespec timer_delay; - do { unsigned old_timers_run = timers_run; @@ -4693,19 +4688,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, && requeued_events_pending_p ()) break; - if (timespec_valid_p (timer_delay)) - { - if (timespec_cmp (timer_delay, timeout) < 0) - { - timeout = timer_delay; - timeout_reduced_for_timers = true; - } - } - else - { - /* This is so a breakpoint can be put here. */ + /* This is so a breakpoint can be put here. */ + if (!timespec_valid_p (timer_delay)) wait_reading_process_output_1 (); - } } /* Cause C-g and alarm signals to take immediate action, @@ -4875,6 +4860,7 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (!XPROCESS (proc)->read_output_skip) continue; FD_CLR (channel, &Available); + process_skipped = true; XPROCESS (proc)->read_output_skip = 0; if (XPROCESS (proc)->read_output_delay < adaptive_nsecs) adaptive_nsecs = XPROCESS (proc)->read_output_delay; @@ -4884,6 +4870,30 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, process_output_skip = 0; } + /* If we've got some output and haven't limited our timeout + * with adaptive read buffering, limit it. */ + if (got_some_output > 0 && !process_skipped + && (timeout.tv_sec + || timeout.tv_nsec > READ_OUTPUT_DELAY_INCREMENT)) + timeout = make_timespec (0, READ_OUTPUT_DELAY_INCREMENT); + + + if (NILP (wait_for_cell) && just_wait_proc >= 0 + && timespec_valid_p (timer_delay) + && timespec_cmp (timer_delay, timeout) < 0) + { + struct timespec timeout_abs = timespec_add (current_timespec (), + timeout); + if (!timespec_valid_p (got_output_end_time) + || timespec_cmp (timeout_abs, + got_output_end_time) < 0) + got_output_end_time = timeout_abs; + timeout = timer_delay; + } + else + got_output_end_time = invalid_timespec (); + + #if defined (HAVE_NS) nfds = ns_select #elif defined (HAVE_GLIB) @@ -4955,9 +4965,17 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, /* If we woke up due to SIGWINCH, actually change size now. */ do_pending_window_change (0); - if (wait != INFINITY && nfds == 0 && ! timeout_reduced_for_timers) - /* We waited the full specified time, so return now. */ - break; + if (nfds == 0) + { + struct timespec now = current_timespec (); + if ((timeout.tv_sec == 0 && timeout.tv_nsec == 0) + || (wait == TIMEOUT && timespec_cmp (end_time, now) <= 0) + || (!process_skipped && got_some_output > 0 + && (!timespec_valid_p (got_output_end_time) + || timespec_cmp (got_output_end_time, now) <= 0))) + break; + } + if (nfds < 0) { if (xerrno == EINTR) @@ -5084,6 +5102,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, got_some_output = nread; if (nread > 0) { + /* vacuum up any leftovers without waiting. */ + if (wait_proc == XPROCESS (proc)) + wait = MINIMUM; /* Since read_process_output can run a filter, which can call accept-process-output, don't try to read from any other processes -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:48:20 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:48:20 +0000 Received: from localhost ([127.0.0.1]:39378 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMrj-0002Oe-G9 for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:48:19 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:55834) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMrh-0002OU-Hn for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:48:17 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 56358209AC; Sat, 4 Jul 2015 08:48:17 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 04 Jul 2015 08:48:17 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=GAPyvZspUXCGDJ32UBJOQy5BOYM =; b=C0IF8Z7MUfOdElTvc1z2ECClhnacKOs6I4wKdTpIRdMC1iXHMN/5LeSGEsT UKSdCaoxnlgBYgYfRA11X4FHFTYdwp7cugf/t/CIyaOSRcUXPtOGIC0eOMf2a70Q l3vi9bZlXOg5Q7hgMXVkThp6wZ+sxITvjDma9bcgdNNoPFe8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=GA PyvZspUXCGDJ32UBJOQy5BOYM=; b=b8uphXQTtK6C/Xtm3FgTAt74ABsSfnk13j MzNBieURrNsWdoxKlbawGV2dfY+uRILqlh8VEKKIMKcQplOIpPBNHJlU9GYMESr0 qCB5VZq/v7URGv4vc8yg3htdOaCfS+s9+IBrsI7+yBbPBQX7yfgfsIeRSJru9/Xv sA4/wFvuE= X-Sasl-enc: UtmlGCRh/QdIY1I0k/FiGoeIBGGkoRoraaNUE5OfVO2s 1436014097 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 153F9C00287 for <20978@debbugs.gnu.org>; Sat, 4 Jul 2015 08:48:17 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id 242271FE26; Sat, 4 Jul 2015 05:48:11 -0700 (PDT) From: Ian Kelling To: 20978@debbugs.gnu.org Subject: [PATCH 7/7] Avoid returning early reading process output due to SIGIO Date: Sat, 04 Jul 2015 05:48:11 -0700 Message-ID: <87ioa0hywk.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) * src/process.c (wait_reading_process_output): Extend the behavior of not breaking due to not finding output when a timer has lowered the timeout to include when SIGIO lowers the timeout. diff --git a/src/process.c b/src/process.c index 052f94e..f64a064 100644 --- a/src/process.c +++ b/src/process.c @@ -4967,12 +4967,17 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, if (nfds == 0) { + /* If we've past the requested timeout, or got some output + and aren't skipping processes, and haven't lowered our + timeout due to timers or SIGIO, or have waited a long + amount of time due to repeated timers */ struct timespec now = current_timespec (); - if ((timeout.tv_sec == 0 && timeout.tv_nsec == 0) + if (wait == MINIMUM || (wait == TIMEOUT && timespec_cmp (end_time, now) <= 0) || (!process_skipped && got_some_output > 0 && (!timespec_valid_p (got_output_end_time) - || timespec_cmp (got_output_end_time, now) <= 0))) + || timespec_cmp (got_output_end_time, now) <= 0) + && (timeout.tv_sec > 0 || timeout.tv_nsec > 0))) break; } -- 2.4.5 From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 08:52:41 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 12:52:41 +0000 Received: from localhost ([127.0.0.1]:39382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMvw-0002Vp-Ew for submit@debbugs.gnu.org; Sat, 04 Jul 2015 08:52:40 -0400 Received: from mtaout23.012.net.il ([80.179.55.175]:36695) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBMvs-0002VX-Rq for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 08:52:38 -0400 Received: from conversion-daemon.a-mtaout23.012.net.il by a-mtaout23.012.net.il (HyperSendmail v2007.08) id <0NQY00J00RHYI500@a-mtaout23.012.net.il> for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 15:52:30 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout23.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQY00JB6RRHHU10@a-mtaout23.012.net.il>; Sat, 04 Jul 2015 15:52:30 +0300 (IDT) Date: Sat, 04 Jul 2015 15:52:44 +0300 From: Eli Zaretskii Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes In-reply-to: <87zj3ckso6.fsf@iankelling.org> X-012-Sender: halo1@inter.net.il To: Ian Kelling Message-id: <83a8vcxexv.fsf@gnu.org> References: <87zj3ckso6.fsf@iankelling.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20978 Cc: 20978@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ian Kelling > Date: Sat, 04 Jul 2015 05:34:33 -0700 > > About the patches: > > The first 4 are refactoring and not necessarily dependent on any others, > but independent patches would conflict and they make the code clearer so > I included them. I can separate any of them if needed. > > Patch 3 depends on the patch for debbugs:20976, which is a simple fix > and I expect no problem for it be applied first. Thanks. I don't know how others feel, but I personally would prefer that patches not be split between different messages, as that makes it harder to grasp and apply. Especially since some (most) of them belong to the same changeset. And refactoring should IMO be together with the actual changes. > I was careful to not squash unrelated changes as the function is rather > complicated and I could have saved a fair amount of time if there > weren't unrelated changes in the patch that introduced this bug. Unrelated is in the eyes of the beholder. We all have our different views on that. Thanks again for working on this. I will defer to Paul to provide the _real_ feedback ;-) From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 09:13:47 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 13:13:47 +0000 Received: from localhost ([127.0.0.1]:39399 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBNGM-00035d-Kn for submit@debbugs.gnu.org; Sat, 04 Jul 2015 09:13:46 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:37718) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBNGK-00035U-1X for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 09:13:44 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id CA51920FE9; Sat, 4 Jul 2015 09:13:43 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Sat, 04 Jul 2015 09:13:43 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=umcQM 5OJRyEX4O4woffTEsO6tVo=; b=mXRp2J2TwXfOfrMY3MUB328jme3Urb3j9D0Z1 rmKq1PNvUAkTvsTAdqBBZNoNmZnH3cAUR3GNLuiWjDipNa6Z4R/kAC2ZusoU8c1X 8xx06oFJIBZgmllH9veOMs2Eq4rbKZ9vA824t324pUxXGaQ8LnmTizTB2skEN3pA 2OYY98= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=umcQM5OJRyEX4O4woffTEsO6tVo=; b=Uaql6 ozTj2pnXd4R4C+Oxbl0zFesVcnhF5VDfHbPMyKUxvl9zKFqhAQ/ik/+Y/juWM1Ja 0LoySIJ4GoWPHt6L9s7w25AZJYhspkELMPi/7eRcB/AEj5zjqTtQpCaGAu4L0fsO p/6KUcvboLZH5Hcs9qTZssrbSuOuFfo9hGFvFI= X-Sasl-enc: 9lMzpDrYegC6btDtGJ0S4XoY+Y9Xo4xz2o4XKxElOlJ5 1436015623 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 88C76C00288; Sat, 4 Jul 2015 09:13:43 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id 94DAD1FE26; Sat, 4 Jul 2015 06:13:37 -0700 (PDT) From: Ian Kelling To: Eli Zaretskii Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes References: <87zj3ckso6.fsf@iankelling.org> <83a8vcxexv.fsf@gnu.org> Date: Sat, 04 Jul 2015 06:13:37 -0700 In-Reply-To: <83a8vcxexv.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jul 2015 15:52:44 +0300") Message-ID: <87ioa0dq0u.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 Cc: 20978@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: > > I don't know how others feel, but I personally would prefer that > patches not be split between different messages, as that makes it > harder to grasp and apply. Especially since some (most) of them > belong to the same changeset. That was my first intuition too. I hadn't submitted a set of patches before to emacs and I couldn't find any documentation on it, except git format-patch docs seems to assume you would always use separate messages. Say the word and I will send one more message which is all of them together. > And refactoring should IMO be together > with the actual changes. > Imo, it depends. >> I was careful to not squash unrelated changes as the function is rather >> complicated and I could have saved a fair amount of time if there >> weren't unrelated changes in the patch that introduced this bug. > > Unrelated is in the eyes of the beholder. We all have our different > views on that. Agreed. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 09:22:34 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 13:22:34 +0000 Received: from localhost ([127.0.0.1]:39403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBNOs-0003Kq-AK for submit@debbugs.gnu.org; Sat, 04 Jul 2015 09:22:34 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:60570) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBNOp-0003Ki-Ry for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 09:22:32 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id AEF03216E7; Sat, 4 Jul 2015 09:22:31 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 04 Jul 2015 09:22:31 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=iankelling.org; h= cc:content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=WE2Hg zFXi21rKpqjKOBUP0qAo/o=; b=PJKFcjMGBTDh2iw4ZCqGNDf7la1XHPFo3zVni CQ7U86zc7vK9PxIGHVcLuxf31SBZ4lIdRR+YAqFTVLsD/gpeQbLhOX1Hf6GkNqkq z4HC5g9l4Bg5NMq3kttHDAHUlQtQXvEXqI7ntHyfMURWIdnNWNhF9Qp8eU3edKCA bHFjXA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=WE2HgzFXi21rKpqjKOBUP0qAo/o=; b=qX0WS EeZVV1/JmOrtGFsymSdP2Dr7BYszuK8Xy7EPjNbudhrOQUXZ5iWWzTMjkIWQOnWS cSLM4QRrLxMukcXKqLZbLk7OF2NQ4wKLMQVeSDIEs6UL2Lbs+66MCAoZPHVilO3c d6HZce+VlO2o2wvS+kjnNbu0Clsvr06b/yNh8Q= X-Sasl-enc: q1ZixoAvC10OciRPCGs8QEfhe93RXjd7rismK/WhjaB9 1436016151 Received: from treetowl.lan (c-73-53-70-213.hsd1.wa.comcast.net [73.53.70.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 67570680128; Sat, 4 Jul 2015 09:22:31 -0400 (EDT) Received: by treetowl.lan (Postfix, from userid 1000) id 722661FE26; Sat, 4 Jul 2015 06:22:25 -0700 (PDT) From: Ian Kelling To: Eli Zaretskii Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes References: <87zj3ckso6.fsf@iankelling.org> <83a8vcxexv.fsf@gnu.org> Date: Sat, 04 Jul 2015 06:22:25 -0700 In-Reply-To: <83a8vcxexv.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jul 2015 15:52:44 +0300") Message-ID: <87k2ugawha.fsf@iankelling.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20978 Cc: 20978@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Eli Zaretskii writes: > Thanks again for working on this. I will defer to Paul to provide the > _real_ feedback ;-) Yw. Thanks for the encouragement. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 09:25:26 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 13:25:26 +0000 Received: from localhost ([127.0.0.1]:39407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBNRd-0003Pw-TL for submit@debbugs.gnu.org; Sat, 04 Jul 2015 09:25:26 -0400 Received: from mtaout22.012.net.il ([80.179.55.172]:46552) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBNRb-0003Pe-UN for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 09:25:25 -0400 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NQY00800SEV6A00@a-mtaout22.012.net.il> for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 16:25:17 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQY008USTA56S20@a-mtaout22.012.net.il>; Sat, 04 Jul 2015 16:25:17 +0300 (IDT) Date: Sat, 04 Jul 2015 16:25:31 +0300 From: Eli Zaretskii Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes In-reply-to: <87ioa0dq0u.fsf@iankelling.org> X-012-Sender: halo1@inter.net.il To: Ian Kelling Message-id: <837fqgxdf8.fsf@gnu.org> References: <87zj3ckso6.fsf@iankelling.org> <83a8vcxexv.fsf@gnu.org> <87ioa0dq0u.fsf@iankelling.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20978 Cc: 20978@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Ian Kelling > Cc: 20978@debbugs.gnu.org > Date: Sat, 04 Jul 2015 06:13:37 -0700 > > Say the word and I will send one more message which is all of them > together. Please wait for others to chime in, I'd hate to have you do unnecessary work, especially as I'm not the one to review your patches. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 14:56:09 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 18:56:10 +0000 Received: from localhost ([127.0.0.1]:39950 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBSbg-0004TC-Fb for submit@debbugs.gnu.org; Sat, 04 Jul 2015 14:56:09 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:51337) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBSbe-0004T4-9O for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 14:56:06 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t64Iu1Vk006587; Sat, 4 Jul 2015 14:56:02 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 9BB6D66252; Sat, 4 Jul 2015 14:56:00 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes Message-ID: References: <87zj3ckso6.fsf@iankelling.org> <83a8vcxexv.fsf@gnu.org> <87ioa0dq0u.fsf@iankelling.org> <837fqgxdf8.fsf@gnu.org> Date: Sat, 04 Jul 2015 14:56:00 -0400 In-Reply-To: <837fqgxdf8.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jul 2015 16:25:31 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5357=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5357> : inlines <3321> : streams <1466258> : uri <1976594> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 20978 Cc: 20978@debbugs.gnu.org, Ian Kelling X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) >> Say the word and I will send one more message which is all of them >> together. I don't think it's worth resending, no. > Please wait for others to chime in, I'd hate to have you do > unnecessary work, especially as I'm not the one to review > your patches. It's a "standard" work flow in the Git world. Presumably we should have a Gnus command which (after marking the 7 messages) checks out a fresh branch, and applies those 7 patches, after which you can look at the separately or together at your leisure with Git/VC/Magit/... Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 15:30:34 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 19:30:35 +0000 Received: from localhost ([127.0.0.1]:39971 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBT8v-0005UC-JZ for submit@debbugs.gnu.org; Sat, 04 Jul 2015 15:30:30 -0400 Received: from mtaout24.012.net.il ([80.179.55.180]:52068) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBT8j-0005Tj-Fh for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 15:30:22 -0400 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NQZ00B009IYIS00@mtaout24.012.net.il> for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 22:21:38 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NQZ004F49S2Y470@mtaout24.012.net.il>; Sat, 04 Jul 2015 22:21:38 +0300 (IDT) Date: Sat, 04 Jul 2015 22:30:25 +0300 From: Eli Zaretskii Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes In-reply-to: X-012-Sender: halo1@inter.net.il To: Stefan Monnier Message-id: <83wpyfwwj2.fsf@gnu.org> References: <87zj3ckso6.fsf@iankelling.org> <83a8vcxexv.fsf@gnu.org> <87ioa0dq0u.fsf@iankelling.org> <837fqgxdf8.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 20978 Cc: 20978@debbugs.gnu.org, ian@iankelling.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Stefan Monnier > Cc: Ian Kelling , 20978@debbugs.gnu.org > Date: Sat, 04 Jul 2015 14:56:00 -0400 > > It's a "standard" work flow in the Git world. I know. But it doesn't mean I must like it, nor that we must adopt it. From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 04 18:20:43 2015 Received: (at 20978) by debbugs.gnu.org; 4 Jul 2015 22:20:43 +0000 Received: from localhost ([127.0.0.1]:40013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBVnf-0003N0-51 for submit@debbugs.gnu.org; Sat, 04 Jul 2015 18:20:43 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:49213) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBVnc-0003Mp-DW for 20978@debbugs.gnu.org; Sat, 04 Jul 2015 18:20:41 -0400 Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id t64MKbhF011714; Sat, 4 Jul 2015 18:20:37 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 62E87660DC; Sat, 4 Jul 2015 18:20:37 -0400 (EDT) From: Stefan Monnier To: Eli Zaretskii Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes Message-ID: References: <87zj3ckso6.fsf@iankelling.org> <83a8vcxexv.fsf@gnu.org> <87ioa0dq0u.fsf@iankelling.org> <837fqgxdf8.fsf@gnu.org> <83wpyfwwj2.fsf@gnu.org> Date: Sat, 04 Jul 2015 18:20:37 -0400 In-Reply-To: <83wpyfwwj2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 04 Jul 2015 22:30:25 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV5357=0 X-NAI-Spam-Version: 2.3.0.9393 : core <5357> : inlines <3321> : streams <1466333> : uri <1976687> X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 20978 Cc: 20978@debbugs.gnu.org, ian@iankelling.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) >> It's a "standard" work flow in the Git world. > I know. But it doesn't mean I must like it, nor that we must > adopt it. No, indeed, but it's worth taking a good look at it, since the Linux guys have spent a fair bit of effort to streamline their process, to deal with the large number of patches they handle. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 05 22:29:05 2015 Received: (at 20978-done) by debbugs.gnu.org; 6 Jul 2015 02:29:05 +0000 Received: from localhost ([127.0.0.1]:41251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBw9Y-00067a-JN for submit@debbugs.gnu.org; Sun, 05 Jul 2015 22:29:05 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:44401) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZBw9V-00066z-RI for 20978-done@debbugs.gnu.org; Sun, 05 Jul 2015 22:29:03 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 06E44160925; Sun, 5 Jul 2015 19:28:56 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id wM5u27GBMUKq; Sun, 5 Jul 2015 19:28:54 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E0028160922; Sun, 5 Jul 2015 19:28:54 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id X0R0Pz43nb-M; Sun, 5 Jul 2015 19:28:54 -0700 (PDT) Received: from [192.168.1.9] (pool-100-32-155-148.lsanca.fios.verizon.net [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B38611608D7; Sun, 5 Jul 2015 19:28:54 -0700 (PDT) Message-ID: <5599E7E6.6090706@cs.ucla.edu> Date: Sun, 05 Jul 2015 19:28:54 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Ian Kelling Subject: Re: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes Content-Type: multipart/mixed; boundary="------------080204070608000002000903" X-Spam-Score: -0.6 (/) X-Debbugs-Envelope-To: 20978-done Cc: 20978-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.6 (/) This is a multi-part message in MIME format. --------------080204070608000002000903 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Thanks for the patches; they were very clear and organized, in a difficult code area. I installed them into the Emacs master with minor changes, along with the attached further patch, and am marking this bug as done. As far as patch format goes, I mildly prefer attachments but the form you used was fine. My preference is because I am not on the bug-gnu-emacs mailing list, and don't know how to retrieve your email from debbugs.gnu.org or from lists.gnu.org -- the best I could come up with was the mbox format of lists.gnu.org but that did not apply cleanly. --------------080204070608000002000903 Content-Type: text/x-diff; name="0008-Avoid-duplicate-calls-to-current_timespec.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0008-Avoid-duplicate-calls-to-current_timespec.patch" >From fea99d2d8563334a8c88ec4207064ce49d77dd1f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 5 Jul 2015 19:19:13 -0700 Subject: [PATCH 8/8] Avoid duplicate calls to current_timespec * src/process.c (wait_reading_process_output): Cache current_timespec results as long as we're not waiting. --- src/process.c | 44 +++++++++++++++++++++++++++++--------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/src/process.c b/src/process.c index 8a8dad7..9d8fa22 100644 --- a/src/process.c +++ b/src/process.c @@ -4591,6 +4591,9 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, int got_some_output = -1; ptrdiff_t count = SPECPDL_INDEX (); + /* Close to the current time if known, an invalid timespec otherwise. */ + struct timespec now = invalid_timespec (); + FD_ZERO (&Available); FD_ZERO (&Writeok); @@ -4611,8 +4614,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, else if (time_limit > 0 || nsecs > 0) { wait = TIMEOUT; - end_time = timespec_add (current_timespec (), - make_timespec (time_limit, nsecs)); + now = current_timespec (); + end_time = timespec_add (now, make_timespec (time_limit, nsecs)); } else wait = INFINITY; @@ -4637,7 +4640,8 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, /* Exit if already run out. */ if (wait == TIMEOUT) { - struct timespec now = current_timespec (); + if (!timespec_valid_p (now)) + now = current_timespec (); if (timespec_cmp (end_time, now) <= 0) break; timeout = timespec_sub (end_time, now); @@ -4830,7 +4834,6 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, } else { - /* Set the timeout for adaptive read buffering if any process has non-zero read_output_skip and non-zero read_output_delay, and we are not reading output for a @@ -4876,17 +4879,21 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, && timespec_valid_p (timer_delay) && timespec_cmp (timer_delay, timeout) < 0) { - struct timespec timeout_abs = timespec_add (current_timespec (), - timeout); + if (!timespec_valid_p (now)) + now = current_timespec (); + struct timespec timeout_abs = timespec_add (now, timeout); if (!timespec_valid_p (got_output_end_time) - || timespec_cmp (timeout_abs, - got_output_end_time) < 0) + || timespec_cmp (timeout_abs, got_output_end_time) < 0) got_output_end_time = timeout_abs; timeout = timer_delay; } else got_output_end_time = invalid_timespec (); + /* NOW can become inaccurate if time can pass during pselect. */ + if (timeout.tv_sec > 0 || timeout.tv_nsec > 0) + now = invalid_timespec (); + #if defined (HAVE_NS) nfds = ns_select #elif defined (HAVE_GLIB) @@ -4965,14 +4972,21 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, haven't lowered our timeout due to timers or SIGIO and have waited a long amount of time due to repeated timers. */ - struct timespec now = current_timespec (); - if (wait < TIMEOUT - || (wait == TIMEOUT && timespec_cmp (end_time, now) <= 0) - || (!process_skipped && got_some_output > 0 - && (!timespec_valid_p (got_output_end_time) - || timespec_cmp (got_output_end_time, now) <= 0) - && (timeout.tv_sec > 0 || timeout.tv_nsec > 0))) + if (wait < TIMEOUT) break; + struct timespec cmp_time + = (wait == TIMEOUT + ? end_time + : (!process_skipped && got_some_output > 0 + && (timeout.tv_sec > 0 || timeout.tv_nsec > 0)) + ? got_output_end_time + : invalid_timespec ()); + if (timespec_valid_p (cmp_time)) + { + now = current_timespec (); + if (timespec_cmp (cmp_time, now) <= 0) + break; + } } if (nfds < 0) -- 2.1.0 --------------080204070608000002000903-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jul 06 02:45:08 2015 Received: (at 20978) by debbugs.gnu.org; 6 Jul 2015 06:45:08 +0000 Received: from localhost ([127.0.0.1]:41395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZC09L-0006a1-9A for submit@debbugs.gnu.org; Mon, 06 Jul 2015 02:45:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34573) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZC09I-0006ZD-Kv for 20978@debbugs.gnu.org; Mon, 06 Jul 2015 02:45:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZC09C-0002L3-Nh for 20978@debbugs.gnu.org; Mon, 06 Jul 2015 02:44:59 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52591) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZC09C-0002Kw-K6; Mon, 06 Jul 2015 02:44:58 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1ZC09A-00064T-Oi; Mon, 06 Jul 2015 02:44:56 -0400 From: Glenn Morris To: 20978@debbugs.gnu.org Subject: Re: bug#20978: 25.0.50; [PATCH 0/7] Emacs can return too fast when reading from any processes References: <87zj3ckso6.fsf@iankelling.org> <5599E7E6.6090706@cs.ucla.edu> X-Spook: Cartel National Guard Wave tempest Small Pox Hacker Al X-Ran: Q4qdof^lM$`fPDd|NDlA>mB8&W$`GD/mx=S'J^99i{$Ix5bCICo&>dDdT6/`|-r]oAPh2/ X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 06 Jul 2015 02:44:56 -0400 In-Reply-To: <5599E7E6.6090706@cs.ucla.edu> (Paul Eggert's message of "Sun, 05 Jul 2015 19:28:54 -0700") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.6 (-----) X-Debbugs-Envelope-To: 20978 Cc: eggert@cs.ucla.edu, ian@iankelling.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.6 (-----) Paul Eggert wrote: > As far as patch format goes, I mildly prefer attachments but the form > you used was fine. My preference is because I am not on the > bug-gnu-emacs mailing list, and don't know how to retrieve your email > from debbugs.gnu.org or from lists.gnu.org -- the best I could come up > with was the mbox format of lists.gnu.org but that did not apply > cleanly. There's M-x gnus-read-ephemeral-emacs-bug-group, if that helps. Or wget 'http://debbugs.gnu.org/cgi/bugreport.cgi?mbox=yes;bug=20978'. (But I don't really get what the problem is.) From unknown Tue Jun 24 05:07:57 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 03 Aug 2015 11:24:06 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator