From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#6149: bug#24531: process-send-string seems to truncate lines over 4096 characters Date: Thu, 27 Jul 2023 08:41:52 +0300 Message-ID: <83r0otnc67.fsf@gnu.org> References: <87aas81jgh.fsf@jidanni.org> <83sf9h257b.fsf@gnu.org> <19e73ab0-19b5-d7f4-8912-20c9e822e3fb@gutov.dev> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21319"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 24531@debbugs.gnu.org, sbaugh@janestreet.com, 6149@debbugs.gnu.org, monnier@iro.umontreal.ca, jidanni@jidanni.org To: Dmitry Gutov , Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 27 07:47:43 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qOtqh-0005G0-7l for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 27 Jul 2023 07:47:43 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qOtlJ-0005CI-Cg; Thu, 27 Jul 2023 01:42:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qOtlD-0005Ak-Cd for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 01:42:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qOtlC-0000aL-Qu for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 01:42:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qOtlC-0005Zj-Mq for bug-gnu-emacs@gnu.org; Thu, 27 Jul 2023 01:42:02 -0400 X-Loop: help-debbugs@gnu.org 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 6149 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 6149-submit@debbugs.gnu.org id=B6149.169043647421363 (code B ref 6149); Thu, 27 Jul 2023 05:42:02 +0000 Original-Received: (at 6149) by debbugs.gnu.org; 27 Jul 2023 05:41:14 +0000 Original-Received: from localhost ([127.0.0.1]:40535 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qOtkQ-0005YU-4a for submit@debbugs.gnu.org; Thu, 27 Jul 2023 01:41:14 -0400 Original-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 Original-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==; Original-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 In-Reply-To: <19e73ab0-19b5-d7f4-8912-20c9e822e3fb@gutov.dev> (message from Dmitry Gutov on Thu, 27 Jul 2023 04:48:18 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266158 Archived-At: > 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?