From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: charles@aurox.ch (Charles A. Roelli) Newsgroups: gmane.emacs.bugs Subject: bug#33191: 26.1.50; remove remaining process input batching doc Date: Sun, 09 Dec 2018 20:24:35 +0100 Message-ID: References: <8336r650jp.fsf@gnu.org> <83tvjm3bkj.fsf@gnu.org> Reply-To: charles@aurox.ch NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1544383153 15110 195.159.176.226 (9 Dec 2018 19:19:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 9 Dec 2018 19:19:13 +0000 (UTC) Cc: 33191@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 09 20:19:09 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gW4bc-0003o3-Mf for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 20:19:09 +0100 Original-Received: from localhost ([::1]:56366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW4dg-0006ZA-97 for geb-bug-gnu-emacs@m.gmane.org; Sun, 09 Dec 2018 14:21:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58246) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gW4dX-0006Xc-Am for bug-gnu-emacs@gnu.org; Sun, 09 Dec 2018 14:21:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gW4dU-000756-4d for bug-gnu-emacs@gnu.org; Sun, 09 Dec 2018 14:21:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36002) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gW4dS-000710-KN for bug-gnu-emacs@gnu.org; Sun, 09 Dec 2018 14:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gW4dS-0002Cq-Ea for bug-gnu-emacs@gnu.org; Sun, 09 Dec 2018 14:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: charles@aurox.ch (Charles A. Roelli) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 09 Dec 2018 19:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33191 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 33191-submit@debbugs.gnu.org id=B33191.15443832618467 (code B ref 33191); Sun, 09 Dec 2018 19:21:02 +0000 Original-Received: (at 33191) by debbugs.gnu.org; 9 Dec 2018 19:21:01 +0000 Original-Received: from localhost ([127.0.0.1]:40260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gW4dR-0002CH-Dm for submit@debbugs.gnu.org; Sun, 09 Dec 2018 14:21:01 -0500 Original-Received: from sinyavsky.aurox.ch ([37.35.109.145]:52721) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gW4dP-0002C4-Lv for 33191@debbugs.gnu.org; Sun, 09 Dec 2018 14:21:00 -0500 Original-Received: from sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) by sinyavsky.aurox.ch (Postfix) with ESMTP id 3EF22229CF for <33191@debbugs.gnu.org>; Sun, 9 Dec 2018 19:25:58 +0000 (UTC) Authentication-Results: sinyavsky.aurox.ch (amavisd-new); dkim=pass reason="pass (just generated, assumed good)" header.d=aurox.ch DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aurox.ch; h= references:reply-to:subject:subject:in-reply-to:to:from:from :message-id:date:date; s=dkim; t=1544383556; x=1545247557; bh=lm mL3CT3Gng1jwWY4BtD5YDNyMe74gaz7AGZBNruAjE=; b=KhkQnzrtqJdiLjwBMP ggcYtMylIMLNR4HOvKByXXEcfln/3pyu2vyMl2wy1bwx00OrlDmaKBz17pvlFwdX lifeFGw1hHcHVoGDg7BrH6l73XvEITfRLGqpz/9kz2Zi7c3qPA2w5rFrqluKA7QN 01/FASWSHUbpHwV7QFzBIsY6A= X-Virus-Scanned: Debian amavisd-new at test.virtualizor.com Original-Received: from sinyavsky.aurox.ch ([127.0.0.1]) by sinyavsky.aurox.ch (sinyavsky.aurox.ch [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id G4G5jMnlJhz2 for <33191@debbugs.gnu.org>; Sun, 9 Dec 2018 19:25:56 +0000 (UTC) Original-Received: from gray (unknown [IPv6:2a02:1205:34ff:bc50:c62c:3ff:fe30:b864]) by sinyavsky.aurox.ch (Postfix) with ESMTPSA id 073FA229AE; Sun, 9 Dec 2018 19:25:55 +0000 (UTC) In-reply-to: <83tvjm3bkj.fsf@gnu.org> (message from Eli Zaretskii on Sun, 09 Dec 2018 18:32:44 +0200) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:153273 Archived-At: > Date: Sun, 09 Dec 2018 18:32:44 +0200 > From: Eli Zaretskii > CC: 33191@debbugs.gnu.org > > > True, but it seems like chunked sending is broken somehow: Bug#6149 > > (GNU/Linux) and Bug#32438 (macOS) both show this. > > The former is supposed to be solved. I re-opened it at the end of September, I think. > > (There may be similar problems on MS Windows; I have not tested.) > > If we say that sending is done in chunks, users might infer that > > there are no such problems. > > I don't see how such a conclusion could follow. IMO, it's important > to tell that we send large strings in smaller chunks, because > otherwise some phenomena might come as a surprise. Fair enough. Maybe I've confused the "chunk" issue with the issue of sending large strings, which might not always be related. > > Maybe we can add that system-dependent problems may occur for input > > longer than 1 kB. > > I don't think we should document bugs. We should solve them instead. Okay. In the meantime, how about the following amended change? It replaces the "500 character" limit with the idea of the "input buffer" limit (which is itself dependent on the process connection type and the OS). diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index e7d61bd..623be09 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -604,10 +604,9 @@ Asynchronous Processes internal purposes (i.e., no user interaction with the subprocess is required), where significant amounts of data need to be exchanged between the subprocess and the Lisp program, it is often better to use -a pipe, because pipes are more efficient, and because they are immune -to stray character injections that ptys introduce for large (around -500 byte) messages. Also, the total number of ptys is limited on many -systems, and it is good not to waste them unnecessarily. +a pipe, because pipes are more efficient. Also, the total number of +ptys is limited on many systems, and it is good not to waste them +unnecessarily. @defun make-process &rest args This function is the basic low-level primitive for starting diff --git a/src/process.c b/src/process.c index b0a3272..e306b2a 100644 --- a/src/process.c +++ b/src/process.c @@ -6456,9 +6456,11 @@ DEFUN ("process-send-region", Fprocess_send_region, Sprocess_send_region, PROCESS may be a process, a buffer, the name of a process or buffer, or nil, indicating the current buffer's process. Called from program, takes three arguments, PROCESS, START and END. -If the region is more than 500 characters long, -it is sent in several bunches. This may happen even for shorter regions. -Output from processes can arrive in between bunches. +If the region is larger than the input buffer of the process (the +length of which depends on the process connection type and the +operating system), it is sent in several bunches. This may happen +even for shorter regions. Output from processes can arrive in between +bunches. If PROCESS is a non-blocking network process that hasn't been fully set up yet, this function will block until socket setup has completed. */) @@ -6489,9 +6491,10 @@ DEFUN ("process-send-string", Fprocess_send_string, Sprocess_send_string, doc: /* Send PROCESS the contents of STRING as input. PROCESS may be a process, a buffer, the name of a process or buffer, or nil, indicating the current buffer's process. -If STRING is more than 500 characters long, -it is sent in several bunches. This may happen even for shorter strings. -Output from processes can arrive in between bunches. +If STRING is larger than the input buffer of the process (the length +of which depends on the process connection type and the operating +system), it is sent in several bunches. This may happen even for +shorter strings. Output from processes can arrive in between bunches. If PROCESS is a non-blocking network process that hasn't been fully set up yet, this function will block until socket setup has completed. */)