From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: talwrii talwrii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Sep 2016 00:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24531@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.14747622933519 (code B ref -1); Sun, 25 Sep 2016 00:12:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Sep 2016 00:11:33 +0000 Received: from localhost ([127.0.0.1]:34905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnx2a-0000uf-Ux for submit@debbugs.gnu.org; Sat, 24 Sep 2016 20:11:33 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59651) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bnwWd-000069-Gx for submit@debbugs.gnu.org; Sat, 24 Sep 2016 19:38:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnwWW-0007LD-Td for submit@debbugs.gnu.org; Sat, 24 Sep 2016 19:38:26 -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,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:50174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnwWW-0007JT-R6 for submit@debbugs.gnu.org; Sat, 24 Sep 2016 19:38:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnwWU-0005Ap-7t for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2016 19:38:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bnwWR-0007GI-No for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2016 19:38:21 -0400 Received: from mail-oi0-x22b.google.com ([2607:f8b0:4003:c06::22b]:33130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bnwWR-0007Fo-HG for bug-gnu-emacs@gnu.org; Sat, 24 Sep 2016 19:38:19 -0400 Received: by mail-oi0-x22b.google.com with SMTP id r126so172065617oib.0 for ; Sat, 24 Sep 2016 16:38:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=sHnEABSX89YoByCmc+ashM1cSOdgJ734OqHulZEkyFE=; b=Bo/kNwnn74GLrq56Vuqy0cOsElygd+AzRsHqO2LRX+r5zlxRCuYIBXtUJk1uvfZoTM Eo+tV14zqm30lghS/rY9hXYvBeWBT77aGW1BN6k6h1W4iLBY9anjlsIlxmxaA8d8kCbk HzUxEclK0XVWiRlzZxXQ7244Zi+ElYfqK1j/GP9MpET/F6cZviDe+zsj02aZ9XJBY2WI cqmSz4kJtZvTHHQuaMyOIT347arDxvSEH1PdCwuHVyDfVSIXjF/w6p5eHiZisT0YFJd6 h8+jZWNpvUA0oKjloWKWdSoV4lsScMPhEBXFCpMeaGl5DUK2PyZCpKAxCULo25ZKIb9f huGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=sHnEABSX89YoByCmc+ashM1cSOdgJ734OqHulZEkyFE=; b=HEZtcwCGlnn9zOz4JUSufRIiZJGtFtR0OCG6K64fgfmHMYUpJSks4ORZ5Q8Xiw9CZ2 dZv8kLF9uS/UJDUcgQ1BkDtPtf9hAZ9av1rmymie1PBSVB08hwPCFnH+yIuOm6jcF0h4 hpYts8SUUeEEDll/cx+l1eO/R4sPD9Z1Xw+hBhK/zG9wnHQg3WHJVYyA3aM8x2LazH5W 2CuxmgORa8ro/wkHnbBCLetqmeS7+j9+CV0DWbz79DhXTsapxXkIlzQQftDUM3YE7ynm IjlDIBtOsebe7Zqr0BGaStZ8X/E7uTK+T61NJBrDV4soKKrn2qG6fpH4+lZnaIJmxiKu cw1g== X-Gm-Message-State: AE9vXwMpumhDFZFJbLIbfqpODgbCHfHbl3CoM2q8FsWksnLMcFho0U2GGzvYePA9oyh4vbarvBhXJk6QUbAKwg== X-Received: by 10.202.88.65 with SMTP id m62mr19302625oib.7.1474760298570; Sat, 24 Sep 2016 16:38:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.172.148 with HTTP; Sat, 24 Sep 2016 16:38:18 -0700 (PDT) From: talwrii talwrii Date: Sat, 24 Sep 2016 18:38:18 -0500 Message-ID: Content-Type: multipart/mixed; boundary=001a113d2c02b9c590053d49638c X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Mailman-Approved-At: Sat, 24 Sep 2016 20:11:31 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (----) --001a113d2c02b9c590053d49638c Content-Type: multipart/alternative; boundary=001a113d2c02b9c58b053d49638a --001a113d2c02b9c58b053d49638a Content-Type: text/plain; charset=UTF-8 === Repro === i. Download attached el file ii. Read it to ensure I am not hacking your computer iii. In the same directory run emacs -Q --eval '(progn (load-file "line-repro.el") (message (format "%S" (repro))))' -nw --batch As the last line of output I get (3005 4100 6006) I wouild expect this 4100 to be 5005 The third value indicates it is the line that gets truncated rather than the string === Version details === In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-08 on binet, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11804000 System Description: Debian GNU/Linux testing (stretch) Configured using: `configure --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib --localstatedir=/var/lib --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp --with-x=yes --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix --001a113d2c02b9c58b053d49638a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
=3D=3D=3D Repro =3D=3D=3D

i. Download attached el file
ii. Read it to ensure I a= m not hacking your computer
iii. In the same directory run

= emacs -Q --eval '(progn (load-file "line-repro.el") (message = (format "%S" (repro))))' -nw --batch

As the last= line of output I get

(3005 4100 6006)

I wouild expect this 4100 to be 5005

The third value indicates it is the line that gets truncated rathe= r than the string

=3D=3D=3D Version details =3D=3D=3D
=
In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-08 on binet, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.11804= 000 System Description: Debian GNU/Linux testing (stretch) Configured using: `configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-li= sp:/usr/share/emacs/site-lisp --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24= .5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-li= sp:/usr/share/emacs/site-lisp --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix

--001a113d2c02b9c58b053d49638a-- --001a113d2c02b9c590053d49638c Content-Type: text/x-emacs-lisp; charset=US-ASCII; name="line-repro.el" Content-Disposition: attachment; filename="line-repro.el" Content-Transfer-Encoding: base64 X-Attachment-Id: f_ithu5lxc0 CihkZWZ1biBzLXJlcGVhdCAobnVtIHMpCiAgOzsgZXh0cmFjdGVkIGZyb20gcy5lbAogICJNYWtl IGEgc3RyaW5nIG9mIFMgcmVwZWF0ZWQgTlVNIHRpbWVzLiIKICAobGV0IChzcykKICAgICh3aGls ZSAoPiBudW0gMCkKICAgICAgKHNldHEgc3MgKGNvbnMgcyBzcykpCiAgICAgIChzZXRxIG51bSAo MS0gbnVtKSkpCiAgICAoYXBwbHkgJ2NvbmNhdCBzcykpKQoKKGRlZnVuIHMtY29uY2F0ICgmcmVz dCBzdHJpbmdzKQogIDs7IGV4dHJhY3RlZCBmcm9tIHMuZWwKICAiSm9pbiBhbGwgdGhlIHN0cmlu ZyBhcmd1bWVudHMgaW50byBvbmUgc3RyaW5nLiIKICAoYXBwbHkgJ2NvbmNhdCBzdHJpbmdzKSkK CihzZXRxIHRlZS1wcm9ncmFtICIKaW1wb3J0IGZjbnRsCmltcG9ydCBvcwppbXBvcnQgc2VsZWN0 CmltcG9ydCBzeXMKCmZkID0gc3lzLnN0ZGluLmZpbGVubygpCmZsID0gZmNudGwuZmNudGwoZmQs IGZjbnRsLkZfR0VURkwpCmZjbnRsLmZjbnRsKGZkLCBmY250bC5GX1NFVEZMLCBmbCB8IG9zLk9f Tk9OQkxPQ0spCgpmaWxlbmFtZSwgPSBzeXMuYXJndlsxOl0KCndpdGggb3BlbihmaWxlbmFtZSwg J3cnKSBhcyBzdHJlYW06CiAgICB3aGlsZSBUcnVlOgogICAgICAgIHNlbGVjdC5zZWxlY3QoW3N5 cy5zdGRpbl0sIFtdLCBbc3lzLnN0ZGluXSwgMC4yKQogICAgICAgIGRhdGEgPSBzeXMuc3RkaW4u cmVhZCgpCiAgICAgICAgaWYgZGF0YSA9PSAnJzoKICAgICAgICAgICAgYnJlYWsKICAgICAgICBl bHNlOgogICAgICAgICAgICBzdHJlYW0ud3JpdGUoZGF0YSkKICAgICAgICAgICAgc3RyZWFtLmZs dXNoKCkKIikKCihkZWZ1biByZXBybyAoKQogIChsaXN0CiAgICAgKGxlbmd0aCAod3JpdGUtdG8t ZmlsZSAocy1yZXBlYXQgMzAwMCAiYSIpKSkKICAgICAobGVuZ3RoICh3cml0ZS10by1maWxlIChz LXJlcGVhdCA1MDAwICJhIikpKQogICAgIChsZW5ndGggKHdyaXRlLXRvLWZpbGUgKHMtY29uY2F0 IChzLXJlcGVhdCAzMDAwICJhIikgIlxuIiAocy1yZXBlYXQgMzAwMCAiYSIpKSkpCiAgICAgKSkK CihkZWZ1biB3cml0ZS10by1maWxlIChpbnB1dCkKICAobGV0IChwKQoKICAgIChpZiAobm90IChm aWxlLWV4aXN0cy1wICIvdG1wL2JldHRlcnRlZS5weSIpKQogICAgICAgICh3cml0ZS1yZWdpb24g dGVlLXByb2dyYW0gbmlsICIvdG1wL2JldHRlcnRlZS5weSIpKQoKICAgIChzZXRxIHAgKHN0YXJ0 LXByb2Nlc3MgImJvY3AiICIqYm9jcCoiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICJweXRo b24iICIvdG1wL2JldHRlcnRlZS5weSIgIi90bXAvbGluZS1yZXByby1idWciKSkKICAgIChwcm9j ZXNzLXNlbmQtc3RyaW5nIHAgaW5wdXQpCiAgICAocHJvY2Vzcy1zZW5kLXN0cmluZyBwICJcbm5l eHQiKQogICAgKHByb2Nlc3Mtc2VuZC1lb2YgcCkKCiAgICAobWVzc2FnZSAoZm9ybWF0ICJXYWl0 aW5nIGZvciBwcm9jZXNzIHRvIGRpZSIpKQogICAgKHdoaWxlIChwcm9jZXNzLWxpdmUtcCBwKQog ICAgICAoc2l0LWZvciAwLjEpKQogICAgKG1lc3NhZ2UgIlByb2Nlc3MgaXMgZGVhZCIpCiAgICAo Z2V0LXN0cmluZy1mcm9tLWZpbGUgIi90bXAvbGluZS1yZXByby1idWciKQogICAgKSkKCihkZWZ1 biBnZXQtc3RyaW5nLWZyb20tZmlsZSAoZmlsZVBhdGgpCiAgIlJldHVybiBmaWxlUGF0aCdzIGZp bGUgY29udGVudC4iCiAgKHdpdGgtdGVtcC1idWZmZXIKICAgIChpbnNlcnQtZmlsZS1jb250ZW50 cyBmaWxlUGF0aCkgKGJ1ZmZlci1zdHJpbmcpKSkKCg== --001a113d2c02b9c590053d49638c-- From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Thien-Thi Nguyen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Sep 2016 09:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: talwrii talwrii Cc: 24531@debbugs.gnu.org Reply-To: 24531@debbugs.gnu.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.14748838102631 (code B ref 24531); Mon, 26 Sep 2016 09:57:02 +0000 Received: (at 24531) by debbugs.gnu.org; 26 Sep 2016 09:56:50 +0000 Received: from localhost ([127.0.0.1]:36033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boSeX-0000gL-MK for submit@debbugs.gnu.org; Mon, 26 Sep 2016 05:56:49 -0400 Received: from mail.agora-net.com ([67.59.132.6]:35363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boSeW-0000gD-1S for 24531@debbugs.gnu.org; Mon, 26 Sep 2016 05:56:48 -0400 Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1boSeV-00034q-8t; Mon, 26 Sep 2016 05:56:47 -0400 Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1boROo-0001V7-Aq; Mon, 26 Sep 2016 10:36:30 +0200 From: Thien-Thi Nguyen References: Mail-Followup-To: 24531@debbugs.gnu.org Date: Mon, 26 Sep 2016 10:36:21 +0200 In-Reply-To: (talwrii talwrii's message of "Sat, 24 Sep 2016 18:38:18 -0500") Message-ID: <87shsn9hx6.fsf@zigzag.favinet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () talwrii talwrii () Sat, 24 Sep 2016 18:38:18 -0500 (3005 4100 6006) I wouild expect this 4100 to be 5005 See variable =E2=80=98process-connection-type=E2=80=99. When i add: (setq process-connection-type nil) to the beginning of line-repo.el, i see the expected output. =2D- Thien-Thi Nguyen ----------------------------------------------- (defun responsep (type via) (case type (technical (eq 'mailing-list via)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlfo3gcACgkQZwMiJEyAdQIVvQCffMgCek2+ad0Bx6nD0vzetZL0 apMAmQG4T0VzyHsQHty1zyfgar0BuVHf =wH8y -----END PGP SIGNATURE----- --=-=-=-- From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 26 Sep 2016 10:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 24531@debbugs.gnu.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.14748853985128 (code B ref 24531); Mon, 26 Sep 2016 10:24:02 +0000 Received: (at 24531) by debbugs.gnu.org; 26 Sep 2016 10:23:18 +0000 Received: from localhost ([127.0.0.1]:36046 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boT49-0001Kd-NO for submit@debbugs.gnu.org; Mon, 26 Sep 2016 06:23:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:57504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1boT47-0001KV-Nh for 24531@debbugs.gnu.org; Mon, 26 Sep 2016 06:23:16 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 74341AAEF for <24531@debbugs.gnu.org>; Mon, 26 Sep 2016 10:23:14 +0000 (UTC) From: Andreas Schwab References: <87shsn9hx6.fsf@zigzag.favinet> X-Yow: I am having a pleasant time!! Date: Mon, 26 Sep 2016 12:23:14 +0200 In-Reply-To: <87shsn9hx6.fsf@zigzag.favinet> (Thien-Thi Nguyen's message of "Mon, 26 Sep 2016 10:36:21 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -5.4 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.4 (-----) On Sep 26 2016, Thien-Thi Nguyen wrote: > () talwrii talwrii > () Sat, 24 Sep 2016 18:38:18 -0500 > > (3005 4100 6006) > > I wouild expect this 4100 to be 5005 > > See variable ‘process-connection-type’. When i add: > > (setq process-connection-type nil) > > to the beginning of line-repo.el, i see the expected output. That could be the effect of the TTY ICANON handling. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 15 17:54:00 2018 Received: (at control) by debbugs.gnu.org; 15 Dec 2018 22:54:00 +0000 Received: from localhost ([127.0.0.1]:49754 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYIop-0000AR-Rx for submit@debbugs.gnu.org; Sat, 15 Dec 2018 17:53:59 -0500 Received: from eggs.gnu.org ([208.118.235.92]:40958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYIoo-0000AC-RM for control@debbugs.gnu.org; Sat, 15 Dec 2018 17:53:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gYIoj-0005UO-6g for control@debbugs.gnu.org; Sat, 15 Dec 2018 17:53:53 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55706) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYIoj-0005Tw-2f for control@debbugs.gnu.org; Sat, 15 Dec 2018 17:53:53 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gYIoi-0007xn-VQ for control@debbugs.gnu.org; Sat, 15 Dec 2018 17:53:53 -0500 Subject: control message for bug 24531 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Sat, 15 Dec 2018 17:53:52 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -6.0 (------) merge 12440 24531 From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 07 10:53:39 2019 Received: (at control) by debbugs.gnu.org; 7 Oct 2019 14:53:39 +0000 Received: from localhost ([127.0.0.1]:48814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHUOI-0002jz-Vi for submit@debbugs.gnu.org; Mon, 07 Oct 2019 10:53:39 -0400 Received: from quimby.gnus.org ([80.91.231.51]:39278) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iHUOH-0002jr-61 for control@debbugs.gnu.org; Mon, 07 Oct 2019 10:53:37 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iHUOE-0004jp-Cx for control@debbugs.gnu.org; Mon, 07 Oct 2019 16:53:36 +0200 Date: Mon, 07 Oct 2019 16:53:34 +0200 Message-Id: <87eezo7gk1.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #12440 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 12440 + confirmed quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) tags 12440 + confirmed quit From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 13 16:37:44 2019 Received: (at control) by debbugs.gnu.org; 13 Oct 2019 20:37:44 +0000 Received: from localhost ([127.0.0.1]:37130 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJkcZ-0001aO-NU for submit@debbugs.gnu.org; Sun, 13 Oct 2019 16:37:43 -0400 Received: from quimby.gnus.org ([80.91.231.51]:38322) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iJkcX-0001aE-HF for control@debbugs.gnu.org; Sun, 13 Oct 2019 16:37:41 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iJkcU-0005Cx-QS for control@debbugs.gnu.org; Sun, 13 Oct 2019 22:37:40 +0200 Date: Sun, 13 Oct 2019 22:37:38 +0200 Message-Id: <87d0f08jql.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #6149 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: forcemerge 6149 12440 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) forcemerge 6149 12440 quit From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jul 2023 20:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Stefan Monnier Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.168988413531376 (code B ref 24531); Thu, 20 Jul 2023 20:16:02 +0000 Received: (at 24531) by debbugs.gnu.org; 20 Jul 2023 20:15:35 +0000 Received: from localhost ([127.0.0.1]:60012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMa3U-00089a-0g for submit@debbugs.gnu.org; Thu, 20 Jul 2023 16:15:35 -0400 Received: from mxout1.mail.janestreet.com ([38.105.200.78]:58597) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMa3S-000897-0N for 24531@debbugs.gnu.org; Thu, 20 Jul 2023 16:15:19 -0400 From: Spencer Baugh In-Reply-To: (Stefan Monnier's message of "Mon, 31 May 2010 21:50:37 -0400") References: <87aas81jgh.fsf@jidanni.org> Date: Thu, 20 Jul 2023 16:15:11 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) --=-=-= Content-Type: text/plain I see that this bug is about 13 years old. I think there's a pretty obvious solution: process-connection-type should default to nil. Otherwise this is a footgun just waiting to happen for anyone writing process-interaction code in Emacs. But if we don't do that, we should at least document it. See my attached patch. Btw, just to feed the fire, here's my own reproducer: (with-temp-buffer (make-process :name "broken" :buffer (current-buffer) :command '("cat")) (process-send-string nil (make-string 10000 ?x)) (process-send-eof) (sit-for 1) (cons (point-min) (point-max))) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Include-warning-about-long-line-truncation-in-proces.patch >From dcfd129b3f08273a8b0705f03b6074443a7a33c1 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Thu, 20 Jul 2023 16:13:56 -0400 Subject: [PATCH] Include warning about long line truncation in process-send-string Maybe we can't fix this. But we can at least warn the user about it! To have no warning anywhere about this default behavior which silently discards data, is very user-hostile. * src/process.c (Fprocess_send_string): Include a warning about long line truncation (bug#6149) --- src/process.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/process.c b/src/process.c index 67d1d3e425f..82ace1b3a41 100644 --- a/src/process.c +++ b/src/process.c @@ -6755,6 +6755,8 @@ DEFUN ("process-send-string", Fprocess_send_string, Sprocess_send_string, 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 the process connection type is `pty', then long lines present in +STRING may be truncated depending on the operating system. 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. */) -- 2.39.3 --=-=-=-- From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 20 Jul 2023 21:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Spencer Baugh Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.16898881256435 (code B ref 24531); Thu, 20 Jul 2023 21:23:02 +0000 Received: (at 24531) by debbugs.gnu.org; 20 Jul 2023 21:22:05 +0000 Received: from localhost ([127.0.0.1]:60100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMb65-0001fi-HU for submit@debbugs.gnu.org; Thu, 20 Jul 2023 17:22:05 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:57396) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMb61-0001f6-My; Thu, 20 Jul 2023 17:22:04 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D0E60442C30; Thu, 20 Jul 2023 17:21:55 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 656E5442C32; Thu, 20 Jul 2023 17:21:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689888114; bh=uGXvrhhlltnVdVP10M8w4uUOjenJPQgF9nOuSW9zTKA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LBltPPGmA6uTRyiMZJhnfpCxZ5qSl0fdxP7MJuX9cnHLDa96F7pxqGdYvOwM7ZHj5 CnNWtdtAjssjjdF9bC6Zr3AXI/d1vCxIoRBQaEjx8Sr+hk+WfmvyUjjLzDceKZ0pWV rISYitQpdYYE+tmcuK6hvFpeaAwOor9EY+PJQOVovgOIV25TNqHiHBDi8T+Tk1hNcA GWxlyyLdXnomOlAjh5kyPvCn2i3GFCQXAgjoSOb7cTrEN/a0nz2JDTcBACImm3W8bt w28a7GQktJZ2xvd1bD26vdTxIKOSdBxA09bNwBqK8smWaiXDZWAoivAQT3kZ8+oxAT 6Bf/zaLt0Ntjw== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 555E7120321; Thu, 20 Jul 2023 17:21:54 -0400 (EDT) From: Stefan Monnier In-Reply-To: (Spencer Baugh's message of "Thu, 20 Jul 2023 16:15:11 -0400") Message-ID: References: <87aas81jgh.fsf@jidanni.org> Date: Thu, 20 Jul 2023 17:21:53 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.132 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > I see that this bug is about 13 years old. I think there's a pretty > obvious solution: process-connection-type should default to nil. In practice, that can't fly because it'll break existing code. Also I don't think either value of `process-connection-type` is a good option. IOW, I think that the connection type should be a mandatory argument when creating an async process (except maybe for those processes with no input/output). So maybe, the default value of `process-connection-type` should be `unspecified` and the process creation code should emit a warning when creating a process whose connection type is `unspecified` (just a warning, tho: it should then pursue execution as if that value was t, as usual, so as to preserve compatibility). Stefan From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: bug#6149: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2023 05:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Stefan Monnier Cc: 24531@debbugs.gnu.org, sbaugh@janestreet.com, 6149@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.16899179917319 (code B ref 24531); Fri, 21 Jul 2023 05:40:02 +0000 Received: (at 24531) by debbugs.gnu.org; 21 Jul 2023 05:39:51 +0000 Received: from localhost ([127.0.0.1]:60362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMirn-0001tt-80 for submit@debbugs.gnu.org; Fri, 21 Jul 2023 01:39:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47488) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMirh-0001tW-Vf; Fri, 21 Jul 2023 01:39:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMira-00040D-6a; Fri, 21 Jul 2023 01:39:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=sz40LrDqf2E8EDxiFG/QQ/yAFYZH/VZlTh3SqEsZETw=; b=GlFGdWbA/Ghc kiWCE/SU1GXlx3XAAyb3zfoTQjZM89KoUYKx7UDwdvGK9xssseMwNZhwVuSXtmnXV9nJr54yUc36s zHHIFbMkHYecntBXxkOkiBXpW8Y5DGFEXVYryCjFdhAwDIYf2cWeUZkUVjFCGE741M80vKrIynjAg MBkqZJr9HLb0z/MigmkvDnc6GyTkSPK79AwSjRVMGqeec3Ay1OuXvs1m7wDjVndTFyo1GDPZXNZv9 gZ9XrQumTSwtg4DfH9/F1+5vss2gFawx0Jtp1QhxoOlggcxE3LOVgVEIX04AYRou1no1K7pv0T49t Stc9hNm+VciPu3HmtIY3vA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMirF-0000B9-CM; Fri, 21 Jul 2023 01:39:31 -0400 Date: Fri, 21 Jul 2023 08:39:52 +0300 Message-Id: <83sf9h257b.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (bug-gnu-emacs@gnu.org) References: <87aas81jgh.fsf@jidanni.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, jidanni@jidanni.org > Date: Thu, 20 Jul 2023 17:21:53 -0400 > From: Stefan Monnier via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > > I see that this bug is about 13 years old. I think there's a pretty > > obvious solution: process-connection-type should default to nil. > > In practice, that can't fly because it'll break existing code. Indeed. A large portion (I think the majority, but I'm not sure) of Lisp programs that use bidirectional communications with async subprocesses actually _want_ the PTY interface, because they act as GUI front-ends to other programs. Think "M-x term", "M-x gdb", inferior-python-mode, etc. Even "M-x grep" and the likes need that because they rely on default color output, which only happens if Grep is connected to a terminal device. Some of the Emacs features based on this don't work or don't work well on MS-Windows because Windows only supports pipes. Do we really want such semi-broken behavior on GNU and Unix systems? The number of applications that (a) don't need console-like behavior and (b) need to send larger-than-4KB buffers to sub-processes is quite small. Which is why this issue comes up only very rarely. So making pipes the default will fix a very small fraction of applications, and break the vast majority -- clearly a wrong balance. > Also I don't think either value of `process-connection-type` is a good > option. IOW, I think that the connection type should be a mandatory > argument when creating an async process (except maybe for those > processes with no input/output). If we go that way, we should start by specifying :connection-type for all the uses of make-process and start-process we have in the core. It's a large job, but before it is done we cannot in good faith make such an incompatible transition. > So maybe, the default value of `process-connection-type` should be > `unspecified` and the process creation code should emit a warning when > creating a process whose connection type is `unspecified` (just > a warning, tho: it should then pursue execution as if that value was t, > as usual, so as to preserve compatibility). Something like that, yes. But I'm actually wondering how come modern Linux kernels don't have a way of lifting this restriction, or at least enlarging the limit so it makes the problem even less frequent. Is there some inherent limitation that this must be 4KB and nothing larger? From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2023 13:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, Stefan Monnier , jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.168994793110528 (code B ref 24531); Fri, 21 Jul 2023 13:59:02 +0000 Received: (at 24531) by debbugs.gnu.org; 21 Jul 2023 13:58:51 +0000 Received: from localhost ([127.0.0.1]:34321 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMqeg-0002jk-JI for submit@debbugs.gnu.org; Fri, 21 Jul 2023 09:58:51 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]:59969) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMqea-0002j9-5b for 24531@debbugs.gnu.org; Fri, 21 Jul 2023 09:58:46 -0400 From: Spencer Baugh In-Reply-To: <83sf9h257b.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Jul 2023 08:39:52 +0300") References: <87aas81jgh.fsf@jidanni.org> <83sf9h257b.fsf@gnu.org> Date: Fri, 21 Jul 2023 09:58:38 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.0 (-) Eli Zaretskii writes: >> Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, jidanni@jidanni.org >> Date: Thu, 20 Jul 2023 17:21:53 -0400 >> From: Stefan Monnier via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> > I see that this bug is about 13 years old. I think there's a pretty >> > obvious solution: process-connection-type should default to nil. >> >> In practice, that can't fly because it'll break existing code. > > Indeed. I agree that we probably can't change the default. However... > A large portion (I think the majority, but I'm not sure) of > Lisp programs that use bidirectional communications with async > subprocesses actually _want_ the PTY interface, because they act as > GUI front-ends to other programs. Think "M-x term", "M-x gdb", > inferior-python-mode, etc. Even "M-x grep" and the likes need that > because they rely on default color output, which only happens if Grep > is connected to a terminal device. Some of the Emacs features based > on this don't work or don't work well on MS-Windows because Windows > only supports pipes. Do we really want such semi-broken behavior on > GNU and Unix systems? > > The number of applications that (a) don't need console-like behavior > and (b) need to send larger-than-4KB buffers to sub-processes is quite > small. Which is why this issue comes up only very rarely. So making > pipes the default will fix a very small fraction of applications, and > break the vast majority -- clearly a wrong balance. I see your point, but at the same time, the PTY interface on its own is not sufficient to make these applications work, not at all. Specialized modes are necessary to make M-x term (to implement a terminal) and M-x grep (to parse ANSI color codes) and other such programs work. Running things in a PTY without such specialized code doesn't give you anything, AFAIK, because a PTY alone is far from enough to make the Emacs end behave like a terminal. So such programs need to be aware and careful about such things anyway, and need additional infrastructure on top of make-process. So the default being "pty" gives such programs very little: it doesn't save them any complexity. Programs that just want to do some data processing with a subprocess, on the other hand, work fine with just make-process alone, they need no additional infrastructure, just process-send-string and reading directly from the process buffer. The default being "pipe" would take away a big footgun for such programs, since it's easy to forget that and then have a silently wrong program which will fail once you get large input. >> Also I don't think either value of `process-connection-type` is a good >> option. IOW, I think that the connection type should be a mandatory >> argument when creating an async process (except maybe for those >> processes with no input/output). > > If we go that way, we should start by specifying :connection-type for > all the uses of make-process and start-process we have in the core. > It's a large job, but before it is done we cannot in good faith make > such an incompatible transition. I can do that. However, what about my patch adding a warning about this to process-send-string? I think that is independently valuable. Right now we have no documentation of this problem... >> So maybe, the default value of `process-connection-type` should be >> `unspecified` and the process creation code should emit a warning when >> creating a process whose connection type is `unspecified` (just >> a warning, tho: it should then pursue execution as if that value was t, >> as usual, so as to preserve compatibility). > > Something like that, yes. > > But I'm actually wondering how come modern Linux kernels don't have a > way of lifting this restriction, or at least enlarging the limit so it > makes the problem even less frequent. Is there some inherent > limitation that this must be 4KB and nothing larger? Unfortunately from looking at Linux the limit of 4096 seems to be hardcoded. From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2023 14:19:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Spencer Baugh Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, monnier@iro.umontreal.ca, jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.168994909112342 (code B ref 24531); Fri, 21 Jul 2023 14:19:01 +0000 Received: (at 24531) by debbugs.gnu.org; 21 Jul 2023 14:18:11 +0000 Received: from localhost ([127.0.0.1]:34334 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMqxO-0003Cv-FH for submit@debbugs.gnu.org; Fri, 21 Jul 2023 10:18:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37356) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMqxL-0003Cc-7P; Fri, 21 Jul 2023 10:18:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMqxE-0003dh-PF; Fri, 21 Jul 2023 10:18:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=t9KuBf7oYux5laraWfRTHJ1OQMMJXSd436pIbHu+gic=; b=Z9cPQNMF47fT PrhLWsCCvqhibPzFItrdAMdJFrPg3BR9GJQo1nQQIVvFgNOFk1cQloj/E1twj8B266RbH1pbbfQ7Q sJF+CNFXoUKqUKnrzY7x2iP8Iclf2EnypplbDDj1ljjXCTtzHey3VyjxOUc7t5MbzT/uA6tgB0ziv z0yvarzrz64nW3ANKjxpiRBwAj/VaDXOCJta4kMrcEQyZwCuufUVTpkVFN7gS2sAKre4wMi9viZqQ WK7dlGcdixOw2GCFb0J1UMLK90Ttv21xkgscYLYW5ZFzN1RTn52O45FhmDqjof6B0APMUCjMbeSrc yzt/9SpHzcYBiAMNFPQwhw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qMqxE-00008z-8s; Fri, 21 Jul 2023 10:18:00 -0400 Date: Fri, 21 Jul 2023 17:18:34 +0300 Message-Id: <83edl1bb5x.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Spencer Baugh on Fri, 21 Jul 2023 09:58:38 -0400) References: <87aas81jgh.fsf@jidanni.org> <83sf9h257b.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > From: Spencer Baugh > Cc: Stefan Monnier , 24531@debbugs.gnu.org, > 6149@debbugs.gnu.org, jidanni@jidanni.org > Date: Fri, 21 Jul 2023 09:58:38 -0400 > > Eli Zaretskii writes: > > > The number of applications that (a) don't need console-like behavior > > and (b) need to send larger-than-4KB buffers to sub-processes is quite > > small. Which is why this issue comes up only very rarely. So making > > pipes the default will fix a very small fraction of applications, and > > break the vast majority -- clearly a wrong balance. > > I see your point, but at the same time, the PTY interface on its own is > not sufficient to make these applications work, not at all. Specialized > modes are necessary to make M-x term (to implement a terminal) and M-x > grep (to parse ANSI color codes) and other such programs work. Running > things in a PTY without such specialized code doesn't give you anything, > AFAIK, because a PTY alone is far from enough to make the Emacs end > behave like a terminal. So such programs need to be aware and careful > about such things anyway, and need additional infrastructure on top of > make-process. So the default being "pty" gives such programs very > little: it doesn't save them any complexity. That Emacs needs to do something doesn't invalidate my point. My point is that communications via a PTY is a necessary (though a sufficient) condition for these features. Basically, you cannot use pipes for any interactive feature, because pipes are buffered. > However, what about my patch adding a warning about this to > process-send-string? I think that is independently valuable. Right now > we have no documentation of this problem... This should be documented in the ELisp manual, and in more detail, not just as a vague warning. From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: bug#6149: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Jul 2023 15:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Eli Zaretskii Cc: 24531@debbugs.gnu.org, sbaugh@janestreet.com, 6149@debbugs.gnu.org, jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.168995216917675 (code B ref 24531); Fri, 21 Jul 2023 15:10:02 +0000 Received: (at 24531) by debbugs.gnu.org; 21 Jul 2023 15:09:29 +0000 Received: from localhost ([127.0.0.1]:34483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMrl3-0004az-4u for submit@debbugs.gnu.org; Fri, 21 Jul 2023 11:09:29 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:50532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qMrkz-0004ae-0B; Fri, 21 Jul 2023 11:09:27 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 68E5780575; Fri, 21 Jul 2023 11:09:19 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2BDF980058; Fri, 21 Jul 2023 11:09:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1689952158; bh=uF20kHarf1v+hk7anbvAyj0y9cvctV9Za+N7/9SOO30=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=lHOd6BbXFMVc6eJSnynvtBH4YuaqOYkU5DAgBCayKQ9Yz9s0lVkyAjWpdyovfuNVM i0UN4sjYzU/VTOom//n7Fb9wCY3giEeM/mOu8seiLQEJBFOD8+ZTOMLMogbQL1nOm5 gAYoM+EUA8H9BBMp1p7iF2Wl2TT/FKjXiYJPMfXFwSJFvRYPaYtqcI0qj1x4v59q1V B9DlzQVdttbljd0vPRvbBKMDJpEknUG8nt+YKVbPvneWUS/pzY7YtlRNjAIhAO1dWf X7uAbe2roEJCYA5kVEUfSXngs8QOpEl8kfOIdKvTF0IogophFMMYniBXFWhdkxz1yc N6ojRScg/vdrA== Received: from alfajor (unknown [23.233.149.155]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E634B12037A; Fri, 21 Jul 2023 11:09:17 -0400 (EDT) From: Stefan Monnier In-Reply-To: <83sf9h257b.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Jul 2023 08:39:52 +0300") Message-ID: References: <87aas81jgh.fsf@jidanni.org> <83sf9h257b.fsf@gnu.org> Date: Fri, 21 Jul 2023 11:09:17 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.230 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) >> Also I don't think either value of `process-connection-type` is a good >> option. IOW, I think that the connection type should be a mandatory >> argument when creating an async process (except maybe for those >> processes with no input/output). > If we go that way, we should start by specifying :connection-type for > all the uses of make-process and start-process we have in the core. That would be a good start, yes. Stefan From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: bug#6149: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jul 2023 01:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Spencer Baugh , Eli Zaretskii Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, Stefan Monnier , jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.169042250930520 (code B ref 24531); Thu, 27 Jul 2023 01:49:01 +0000 Received: (at 24531) by debbugs.gnu.org; 27 Jul 2023 01:48:29 +0000 Received: from localhost ([127.0.0.1]:40396 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOq7B-0007w9-1e for submit@debbugs.gnu.org; Wed, 26 Jul 2023 21:48:29 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:35445) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOq79-0007vS-EG; Wed, 26 Jul 2023 21:48:28 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 632A93200917; Wed, 26 Jul 2023 21:48:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 26 Jul 2023 21:48:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1690422500; x=1690508900; bh=swj++But/B6fBXM5vt/zbu6jN8vlelyDDz3 EQoEm76I=; b=OdzikHWIcaeaq0dRpvISx2zQuHIgIjAtrWzk5uH+D2M3GKklN8i gcsu7TyR0H8KMWXjb41PR+WIDYx3o8ghxg/UrGEDpiSSKtcNrv5wEi7DFixlN/1u FjkQ3aqMxOhOBXeDrtghYTwGJQkACJHl1bTEJCqaEDEsKEFl28W4lI3lMUurvr8Z 7WV7d4iFHWiCyAASovZXxktyM31paKMMJMGOMO6IgPo24w6VRtCyfYPAgcx9rhVV zvhmTPRTiVCeMZiGXqTYnedRhVGZAhOiM+3Eokq/j/kQfAPYXAky32Dm4NFZWNGz XOPec4f9y1kytx8WLSRWBxxzIuDLD/vWZzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1690422500; x=1690508900; bh=swj++But/B6fBXM5vt/zbu6jN8vlelyDDz3 EQoEm76I=; b=iKREnXM+etOM/WdBO3uFpryipiN29uluVOomvR4AAtgMbvOPsLy wTLiz3e4Rri4f7a5+iGw7bd6KJ/M7FkFsxM4nGCrKe+D7TC11eD8PLY6YqC4XEPb eLITkb4oGeptDde/sx417nNnVNY726uzfBguoT7O5u09Lat+HyQqZWnas/sqj9HO cY24H637w73fmgmR/O+pKhfnLjQ3W5dC8lFK64uHWskxyR4CRuVJr0OaoQZvtdyK lKdQOLC6gTvEC9S1d4gVz0FdAHpQ2RBi5EK+TMORCbkGTIPv4k1/YGDghTFQ+sx8 gxPxvG5BAg3dlyLcmmA4sLmoeyJrWB03hpA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrieefgdehtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeevledv veenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 26 Jul 2023 21:48:19 -0400 (EDT) Message-ID: <19e73ab0-19b5-d7f4-8912-20c9e822e3fb@gutov.dev> Date: Thu, 27 Jul 2023 04:48:18 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Content-Language: en-US References: <87aas81jgh.fsf@jidanni.org> <83sf9h257b.fsf@gnu.org> From: Dmitry Gutov In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.8 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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.8 (-) On 21/07/2023 16:58, Spencer Baugh wrote: >> But I'm actually wondering how come modern Linux kernels don't have a >> way of lifting this restriction, or at least enlarging the limit so it >> makes the problem even less frequent. Is there some inherent >> limitation that this must be 4KB and nothing larger? > Unfortunately from looking at Linux the limit of 4096 seems to be > hardcoded. If some syscall or etc limits the length of a string to 4096, can't we detect this case, split the string and emit said call multiple times? This function's docstring already mentions the case of If STRING is larger than the input buffer of the process, ... it is sent in several bunches From unknown Fri Jun 13 11:23:07 2025 X-Loop: help-debbugs@gnu.org Subject: bug#24531: bug#6149: bug#24531: process-send-string seems to truncate lines over 4096 characters Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Jul 2023 05:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24531 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed To: Dmitry Gutov , Paul Eggert Cc: 24531@debbugs.gnu.org, sbaugh@janestreet.com, 6149@debbugs.gnu.org, monnier@iro.umontreal.ca, jidanni@jidanni.org Received: via spool by 24531-submit@debbugs.gnu.org id=B24531.169043647421370 (code B ref 24531); Thu, 27 Jul 2023 05:42:02 +0000 Received: (at 24531) by debbugs.gnu.org; 27 Jul 2023 05:41:14 +0000 Received: from localhost ([127.0.0.1]:40537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOtkQ-0005YW-Fw for submit@debbugs.gnu.org; Thu, 27 Jul 2023 01:41:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50334) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOtkN-0005YE-Hr; Thu, 27 Jul 2023 01:41:12 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOtkF-0000Sk-Ue; Thu, 27 Jul 2023 01:41:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6M3e2VB8lMWVUjSKBa6gPNw2Gm/IWtM1+sK3CBH0R4w=; b=IH3PTrPOEPuB UoROcTfDj3a6/BmC+JOK8xNw1bkOV9CoBo3zwy1eJIss8oMOsFmxi9OQ9jjd06X0atKjo1ZBnAg2B ha6sXFgNLRDbiBUHJVkqy6btKRKzZjwnqlVFKkrlAq222Fb2rKtRJlqAKc57y+IhsHlLRBxCPWJgg WSw7QUuSwCobJMvmsPBrqSoYe0YJyomcXJi1hYvieI7NvWsGj5JzjQiYgkKyXdauuexN7r8n81lA1 NiJGVh0bqnLxz33hvUbK43hdu5b6xstrFbx5dOVRANGQ/+H91P0axnZ07pEOQ5OzpCj0/Mvx+jiCl Sxm6djTNMA1kjdvdy3DIiQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOtkF-0000ef-Dw; Thu, 27 Jul 2023 01:41:03 -0400 Date: Thu, 27 Jul 2023 08:41:52 +0300 Message-Id: <83r0otnc67.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <19e73ab0-19b5-d7f4-8912-20c9e822e3fb@gutov.dev> (message from Dmitry Gutov on Thu, 27 Jul 2023 04:48:18 +0300) References: <87aas81jgh.fsf@jidanni.org> <83sf9h257b.fsf@gnu.org> <19e73ab0-19b5-d7f4-8912-20c9e822e3fb@gutov.dev> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Date: Thu, 27 Jul 2023 04:48:18 +0300 > Cc: 24531@debbugs.gnu.org, 6149@debbugs.gnu.org, > Stefan Monnier , jidanni@jidanni.org > From: Dmitry Gutov > > If some syscall or etc limits the length of a string to 4096, can't we > detect this case, split the string and emit said call multiple times? > > This function's docstring already mentions the case of > > If STRING is larger than the input buffer of the process, ... > it is sent in several bunches AFAIU, that is based on the errno value returned by a 'write' call which attempts to write too many bytes (see the would_block function). I guess writes to PTYs don't do that? Paul, do you know anything about that?