GNU logs - #12440, boring messages


Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12440: 24.2; process-send-string only sends 4K for long strings
Resent-From: Hendrik Tews <tews@HIDDEN>
Original-Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Fri, 14 Sep 2012 09:10:02 +0000
Resent-Message-ID: <handler.12440.B.13476137619323 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: report 12440
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: 12440 <at> debbugs.gnu.org
X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN
Received: via spool by submit <at> debbugs.gnu.org id=B.13476137619323
          (code B ref -1); Fri, 14 Sep 2012 09:10:02 +0000
Received: (at submit) by debbugs.gnu.org; 14 Sep 2012 09:09:21 +0000
Received: from localhost ([127.0.0.1]:33016 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1TCRto-0002QJ-U6
	for submit <at> debbugs.gnu.org; Fri, 14 Sep 2012 05:09:21 -0400
Received: from eggs.gnu.org ([208.118.235.92]:41788)
	by debbugs.gnu.org with esmtp (Exim 4.72)
	(envelope-from <tews@HIDDEN>) id 1TCRtl-0002QB-07
	for submit <at> debbugs.gnu.org; Fri, 14 Sep 2012 05:09:19 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tews@HIDDEN>) id 1TCRsj-0007tO-RY
	for submit <at> debbugs.gnu.org; Fri, 14 Sep 2012 05:08:20 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI
	autolearn=unavailable version=3.3.2
Received: from lists.gnu.org ([208.118.235.17]:38527)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tews@HIDDEN>) id 1TCRsj-0007tK-Os
	for submit <at> debbugs.gnu.org; Fri, 14 Sep 2012 05:08:13 -0400
Received: from eggs.gnu.org ([208.118.235.92]:57565)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tews@HIDDEN>) id 1TCRsf-0006XY-Av
	for bug-gnu-emacs@HIDDEN; Fri, 14 Sep 2012 05:08:13 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <tews@HIDDEN>) id 1TCRsY-0007sD-QR
	for bug-gnu-emacs@HIDDEN; Fri, 14 Sep 2012 05:08:09 -0400
Received: from os.inf.tu-dresden.de ([141.76.48.99]:51302)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <tews@HIDDEN>) id 1TCRsY-0007s0-GI
	for bug-gnu-emacs@HIDDEN; Fri, 14 Sep 2012 05:08:02 -0400
Received: from [2002:8d4c:3001:48:222:68ff:fe19:71d]
	(helo=blau.inf.tu-dresden.de)
	by os.inf.tu-dresden.de with esmtpsa (TLSv1:DHE-RSA-AES128-SHA:128)
	(Exim 4.80) id 1TCRsX-0000tS-41
	for bug-gnu-emacs@HIDDEN; Fri, 14 Sep 2012 11:08:01 +0200
Received: from tews by blau.inf.tu-dresden.de with local (Exim 4.80)
	(envelope-from <tews@HIDDEN>) id 1TCRsW-0007Ay-9L
	for bug-gnu-emacs@HIDDEN; Fri, 14 Sep 2012 11:08:00 +0200
From: Hendrik Tews <tews@HIDDEN>
Date: Fri, 14 Sep 2012 11:08:00 +0200
Message-ID: <6xzk4tvuof.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3)
X-Received-From: 208.118.235.17
X-Spam-Score: -6.9 (------)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.13
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
	<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Sender: debbugs-submit-bounces <at> debbugs.gnu.org
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
X-Spam-Score: -6.9 (------)

Hi,

in Emacs 24.2, the following code

  (let* ((process-connection-type t)
         (process (start-process "cat" (current-buffer) "cat")))
    (process-send-string process (format "%s\n" (make-string 6000 ?a))))

inserts only 4095 characters in the current buffer. Setting
process-connection-type to nil will insert all characters. In Emacs 23
the code works always as expected.

This is probably related to Emacs bug #7078. I cannot reproduce the
problem described there (with 257 characters), probably because the
buffer size was increased to 4K.

Bye,

Hendrik Tews



In GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
 of 2012-09-13 on blau
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40300000
Configured using:
 `configure '--prefix' '/usr/local/stow/emacs-24.2' '--with-xpm=no'
 '--with-jpeg=no' '--with-gif=no' '--with-tiff=no''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<return> C-x s ! ! <backspace> C-x s ! <f9> C-x b T 
O <tab> <return> C-x C-v <return> <down> <down> <down> 
<down> <down> <down> <down> C-SPC <down> <down> M-w 
C-x b <return> <backspace> C-y <left> C-j M-x e m a 
c s - v e r <tab> <return> <up> <up> <down> <down> 
<down> C-k C-k <up> <up> <up> <M-right> <M-right> <M-right> 
<M-right> <M-right> <M-right> <M-right> <M-right> <M-right> 
<M-right> <backspace> <backspace> <backspace> 6 0 0 
0 C-e C-j <down> <down> <down> C-SPC C-e M-= M-< A-f 
<down> <down> <down> <C-down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <up> <M-right> * <right> <right> C-o ( p r o 
c e s s - c o n n M-/ <left> <left> C-h v <return> 
C-e SPC n i l ) <down> <tab> C-e <backspace> ) <down> 
<down> <down> <down> <down> <down> C-a C-k <up> <up> 
<up> <up> <up> C-e <backspace> ) C-j C-x 1 <down> <down> 
<down> <down> <down> <down> C-SPC C-e M-= C-a C-k <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> C-e <left> 
<M-backspace> t <down> <down> C-e C-j <down> <down> 
<down> <down> <down> <down> <down> <down> <down> C-SPC 
C-e M-= C-a C-SPC <right> M-= C-a C-SPC C-e M-= C-a 
M-f C-a M-1 C-f C-a M-4 M-0 M-9 M-6 C-f C-a <up> C-a 
M-4 M-0 M-9 M-5 C-f C-a <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <down> C-k 
C-k C-k C-k C-k C-x b T O <tab> <return> <up> <up> 
C-y <return> C-k C-k C-k C-k C-o C-x C-s <up> <up> 
<up> <up> <down> M-x e m a c s - v e r <tab> <return> 
M-x r e p o r t - e m <tab> <return>

Recent messages:
Mark set
Region has 1 line, 1 word, and 4095 characters.
Mark activated
Region has 1 line, 1 word, and 1 character.
Mark activated
Region has 1 line, 1 word, and 4095 characters.
Mark set
Saving file /home/tews/src/pg/TODO...
Wrote /home/tews/src/pg/TODO
GNU Emacs 24.2.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-13 on blau

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev
gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mail-utils jka-compr find-func etags debug dabbrev parse-time
vc-cvs tabulated-list pp help-mode view which-func imenu coq edmacro
kmacro coq-smie-lexer smie coq-indent coq-abbrev coq-local-vars
local-vars-list coq-syntax regexp-opt coq-db holes proof proof-shell
pg-user completion pg-goals pg-response proof-toolbar pg-assoc
proof-tree proof-script proof-menu cus-edit cus-start cus-load wid-edit
span proof-auxmodes proof-utils scomint proof-syntax advice help-fns
advice-preload bufhist easy-mmode ring proof-splash derived pg-custom
proof-config proof-faces proof-useropts pg-pamacs proof-compat easymenu
proof-site proof-autoloads cl pg-vars misearch multi-isearch time-date
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)




Message sent:


Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-Mailer: MIME-tools 5.428 (Entity 5.428)
Content-Type: text/plain; charset=utf-8
X-Loop: help-debbugs@HIDDEN
From: help-debbugs@HIDDEN (GNU bug Tracking System)
To: Hendrik Tews <tews@HIDDEN>
Subject: bug#12440: Acknowledgement (24.2; process-send-string only sends
 4K for long strings)
Message-ID: <handler.12440.B.13476137619323.ack <at> debbugs.gnu.org>
References: <6xzk4tvuof.fsf@HIDDEN>
X-Gnu-PR-Message: ack 12440
X-Gnu-PR-Package: emacs
Reply-To: 12440 <at> debbugs.gnu.org
Date: Fri, 14 Sep 2012 09:10:03 +0000

Thank you for filing a new bug report with debbugs.gnu.org.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 bug-gnu-emacs@HIDDEN

If you wish to submit further information on this problem, please
send it to 12440 <at> debbugs.gnu.org.

Please do not send mail to help-debbugs@HIDDEN unless you wish
to report a problem with the Bug-tracking system.

--=20
12440: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D12440
GNU Bug Tracking System
Contact help-debbugs@HIDDEN with problems


Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 15 Dec 2018 22:54:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Dec 15 17:54:00 2018
Received: from localhost ([127.0.0.1]:49754 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1gYIop-0000AR-Rx
	for submit <at> 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 <rgm@HIDDEN>) id 1gYIoo-0000AC-RM
 for control <at> 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 <rgm@HIDDEN>) id 1gYIoj-0005UO-6g
 for control <at> 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 <rgm@HIDDEN>)
 id 1gYIoj-0005Tw-2f
 for control <at> 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 <rgm@HIDDEN>) id 1gYIoi-0007xn-VQ
 for control <at> debbugs.gnu.org; Sat, 15 Dec 2018 17:53:53 -0500
Subject: control message for bug 24531
To: <control <at> debbugs.gnu.org>
X-Mailer: mail (GNU Mailutils 2.99.98)
Message-Id: <E1gYIoi-0007xn-VQ@HIDDEN>
From: Glenn Morris <rgm@HIDDEN>
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -6.0 (------)

merge 12440 24531




Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12440: 24.2; process-send-string only sends 4K for long strings
Resent-From: Lars Ingebrigtsen <larsi@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 07 Oct 2019 14:54:02 +0000
Resent-Message-ID: <handler.12440.B12440.157046001110522 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12440
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
To: Hendrik Tews <tews@HIDDEN>
Cc: 12440 <at> debbugs.gnu.org
Received: via spool by 12440-submit <at> debbugs.gnu.org id=B12440.157046001110522
          (code B ref 12440); Mon, 07 Oct 2019 14:54:02 +0000
Received: (at 12440) by debbugs.gnu.org; 7 Oct 2019 14:53:31 +0000
Received: from localhost ([127.0.0.1]:48811 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iHUOA-0002jd-FS
	for submit <at> debbugs.gnu.org; Mon, 07 Oct 2019 10:53:30 -0400
Received: from quimby.gnus.org ([80.91.231.51]:39262)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1iHUO9-0002jV-4o
 for 12440 <at> debbugs.gnu.org; Mon, 07 Oct 2019 10:53:29 -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 <larsi@HIDDEN>)
 id 1iHUO4-0004jb-Lv; Mon, 07 Oct 2019 16:53:27 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
References: <6xzk4tvuof.fsf@HIDDEN>
Date: Mon, 07 Oct 2019 16:53:24 +0200
In-Reply-To: <6xzk4tvuof.fsf@HIDDEN> (Hendrik Tews's message
 of "Fri, 14 Sep 2012 11:08:00 +0200")
Message-ID: <87ftk47gkb.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
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: Hendrik Tews <tews@HIDDEN> writes: > in Emacs
 24.2, the following code > > (let* ((process-connection-type t) > (process
 (start-process "cat" (current-buffer) "cat"))) > (process-send-string process
 (format "%s\n" (make-string 6000 ?a) [...] 
 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-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hendrik Tews <tews@HIDDEN> writes:

> in Emacs 24.2, the following code
>
>   (let* ((process-connection-type t)
>          (process (start-process "cat" (current-buffer) "cat")))
>     (process-send-string process (format "%s\n" (make-string 6000 ?a))))
>
> inserts only 4095 characters in the current buffer. Setting
> process-connection-type to nil will insert all characters.

I can confirm that this bug is still present in Emacs 27.

It's odd that this doesn't cause more problems than it does in practice,
but I guess it's rare that we talk to processes this way.

The bug was apparently introduced by the patch below, but I have to
admit when reading it, I don't quite understand what's going on...

commit 2b0a91e78f83fb446cc38efb99399e83ad2cded3
Author: Stefan Monnier <monnier@HIDDEN>
Date:   Mon Apr 12 22:07:48 2010 -0400

    Try to solve the problem of spurious EOF chars in long lines of text
    sent to interactive subprocesses.
    * sysdep.c (child_setup_tty): Do not enable ICANON any more.
    (system_process_attributes): Remove unused var `ttotal'.
    * process.c (send_process): Don't bother breaking long line with EOF
    chars when talking to ttys any more.
    (wait_reading_process_output): Output a warning when called in such
    a way that it could block without being interruptible.

diff --git a/src/ChangeLog b/src/ChangeLog
index ad88dc8311..f9567b1308 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,14 @@
 2010-04-13  Stefan Monnier  <monnier@HIDDEN>
 
+	Try to solve the problem of spurious EOF chars in long lines of text
+	sent to interactive subprocesses.
+	* sysdep.c (child_setup_tty): Do not enable ICANON any more.
+	(system_process_attributes): Remove unused var `ttotal'.
+	* process.c (send_process): Don't bother breaking long line with EOF
+	chars when talking to ttys any more.
+	(wait_reading_process_output): Output a warning when called in such
+	a way that it could block without being interruptible.
+
 	Try to detect file modification within the same second.
 	* buffer.h (struct buffer): New field modtime_size.
 	* buffer.c (reset_buffer): Initialize it.
diff --git a/src/process.c b/src/process.c
index 34aa2c4fcf..7e8f4cc57b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4643,6 +4643,10 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
   FD_ZERO (&Connecting);
 #endif
 
+  if (time_limit == 0 && wait_proc && !NILP (Vinhibit_quit)
+      && !(CONSP (wait_proc->status) && EQ (XCAR (wait_proc->status), Qexit)))
+    message ("Blocking call to accept-process-output with quit inhibited!!");
+
   /* If wait_proc is a process to watch, set wait_channel accordingly.  */
   if (wait_proc != NULL)
     wait_channel = wait_proc->infd;
@@ -5768,34 +5772,6 @@ send_process (proc, buf, len, object)
 	{
 	  int this = len;
 
-	  /* Decide how much data we can send in one batch.
-	     Long lines need to be split into multiple batches.  */
-	  if (p->pty_flag)
-	    {
-	      /* Starting this at zero is always correct when not the first
-		 iteration because the previous iteration ended by sending C-d.
-		 It may not be correct for the first iteration
-		 if a partial line was sent in a separate send_process call.
-		 If that proves worth handling, we need to save linepos
-		 in the process object.  */
-	      int linepos = 0;
-	      unsigned char *ptr = (unsigned char *) buf;
-	      unsigned char *end = (unsigned char *) buf + len;
-
-	      /* Scan through this text for a line that is too long.  */
-	      while (ptr != end && linepos < pty_max_bytes)
-		{
-		  if (*ptr == '\n')
-		    linepos = 0;
-		  else
-		    linepos++;
-		  ptr++;
-		}
-	      /* If we found one, break the line there
-		 and put in a C-d to force the buffer through.  */
-	      this = ptr - buf;
-	    }
-
 	  /* Send this batch, using one or more write calls.  */
 	  while (this > 0)
 	    {
@@ -5899,11 +5875,6 @@ send_process (proc, buf, len, object)
 	      len -= rv;
 	      this -= rv;
 	    }
-
-	  /* If we sent just part of the string, put in an EOF (C-d)
-	     to force it through, before we send the rest.  */
-	  if (len > 0)
-	    Fprocess_send_eof (proc);
 	}
     }
   else
diff --git a/src/sysdep.c b/src/sysdep.c
index 37e7dfbaf9..506af23ef3 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -529,8 +529,6 @@ child_setup_tty (out)
 #endif
   s.main.c_oflag &= ~TAB3;	/* Disable tab expansion */
   s.main.c_cflag = (s.main.c_cflag & ~CSIZE) | CS8; /* Don't strip 8th bit */
-  s.main.c_lflag |= ICANON;	/* Enable erase/kill and eof processing */
-  s.main.c_cc[VEOF] = 04;	/* insure that EOF is Control-D */
   s.main.c_cc[VERASE] = CDISABLE;	/* disable erase processing */
   s.main.c_cc[VKILL] = CDISABLE;	/* disable kill processing */
 
@@ -560,7 +558,6 @@ child_setup_tty (out)
   /* rms: Formerly it set s.main.c_cc[VINTR] to 0377 here
      unconditionally.  Then a SIGNALS_VIA_CHARACTERS conditional
      would force it to 0377.  That looks like duplicated code.  */
-  s.main.c_cc[VEOL] = CDISABLE;
   s.main.c_cflag = (s.main.c_cflag & ~CBAUD) | B9600; /* baud rate sanity */
 #endif /* AIX */
 
@@ -573,6 +570,18 @@ child_setup_tty (out)
   s.main.sg_kill = 0377;
   s.lmode = LLITOUT | s.lmode;        /* Don't strip 8th bit */
 
+  /* We used to enable ICANON (and set VEOF to 04), but this leads to
+     problems where process.c wants to send EOFs every once in a while
+     to force the output, which leads to weird effects when the
+     subprocess has disabled ICANON and ends up seeing those spurious
+     extra EOFs.  So we don't send EOFs any more in
+     process.c:send_process, and instead we disable ICANON by default,
+     so if a subsprocess sets up ICANON, it's his problem (or the Elisp
+     package that talks to it) to deal with lines that are too long.  */
+  s.main.c_lflag &= ~ICANON;	/* Disable line editing and eof processing */
+  s.main.c_cc[VMIN] = 1;
+  s.main.c_cc[VTIME] = 0;
+
 #endif /* not HAVE_TERMIO */
 
   EMACS_SET_TTY (out, &s, 0);
@@ -3344,7 +3353,7 @@ system_process_attributes (Lisp_Object pid)
   unsigned long minflt, majflt, cminflt, cmajflt, vsize;
   time_t sec;
   unsigned usec;
-  EMACS_TIME tnow, tstart, tboot, telapsed,ttotal;
+  EMACS_TIME tnow, tstart, tboot, telapsed;
   double pcpu, pmem;
   Lisp_Object attrs = Qnil;
   Lisp_Object cmd_str, decoded_cmd, tem;


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 7 Oct 2019 14:53:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 07 10:53:39 2019
Received: from localhost ([127.0.0.1]:48814 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iHUOI-0002jz-Vi
	for submit <at> 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 <larsi@HIDDEN>) id 1iHUOH-0002jr-61
 for control <at> 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 <larsi@HIDDEN>) id 1iHUOE-0004jp-Cx
 for control <at> debbugs.gnu.org; Mon, 07 Oct 2019 16:53:36 +0200
Date: Mon, 07 Oct 2019 16:53:34 +0200
Message-Id: <87eezo7gk1.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

tags 12440 + confirmed
quit





Message sent to bug-gnu-emacs@HIDDEN:


X-Loop: help-debbugs@HIDDEN
Subject: bug#12440: 24.2; process-send-string only sends 4K for long strings
Resent-From: Eli Zaretskii <eliz@HIDDEN>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@HIDDEN
Resent-Date: Mon, 07 Oct 2019 16:46:01 +0000
Resent-Message-ID: <handler.12440.B12440.15704667254508 <at> debbugs.gnu.org>
Resent-Sender: help-debbugs@HIDDEN
X-GNU-PR-Message: followup 12440
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: confirmed
To: Lars Ingebrigtsen <larsi@HIDDEN>
Cc: 12440 <at> debbugs.gnu.org, tews@HIDDEN
Received: via spool by 12440-submit <at> debbugs.gnu.org id=B12440.15704667254508
          (code B ref 12440); Mon, 07 Oct 2019 16:46:01 +0000
Received: (at 12440) by debbugs.gnu.org; 7 Oct 2019 16:45:25 +0000
Received: from localhost ([127.0.0.1]:49027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iHW8S-0001Ac-RZ
	for submit <at> debbugs.gnu.org; Mon, 07 Oct 2019 12:45:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:53232)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iHW8R-0001AN-20
 for 12440 <at> debbugs.gnu.org; Mon, 07 Oct 2019 12:45:23 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:53883)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iHW8L-0001XS-9y; Mon, 07 Oct 2019 12:45:17 -0400
Received: from [176.228.60.248] (port=2898 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iHW8K-0007hu-Di; Mon, 07 Oct 2019 12:45:17 -0400
Date: Mon, 07 Oct 2019 19:45:11 +0300
Message-Id: <83lftwzeqw.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
In-reply-to: <87ftk47gkb.fsf@HIDDEN> (message from Lars Ingebrigtsen on Mon, 
 07 Oct 2019 16:53:24 +0200)
References: <6xzk4tvuof.fsf@HIDDEN> <87ftk47gkb.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Lars Ingebrigtsen <larsi@HIDDEN>
> Date: Mon, 07 Oct 2019 16:53:24 +0200
> Cc: 12440 <at> debbugs.gnu.org
> 
> Hendrik Tews <tews@HIDDEN> writes:
> 
> > in Emacs 24.2, the following code
> >
> >   (let* ((process-connection-type t)
> >          (process (start-process "cat" (current-buffer) "cat")))
> >     (process-send-string process (format "%s\n" (make-string 6000 ?a))))
> >
> > inserts only 4095 characters in the current buffer. Setting
> > process-connection-type to nil will insert all characters.
> 
> I can confirm that this bug is still present in Emacs 27.
> 
> It's odd that this doesn't cause more problems than it does in practice,
> but I guess it's rare that we talk to processes this way.

IMO, when a Lisp program intends to communicate with a subprocess this
way, it should indeed set process-connect-type to nil.  It makes no
sense to me to use PTYs to communicate massive amounts of data in
batch-like manner.




Message received at control <at> debbugs.gnu.org:


Received: (at control) by debbugs.gnu.org; 13 Oct 2019 20:37:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Oct 13 16:37:44 2019
Received: from localhost ([127.0.0.1]:37130 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iJkcZ-0001aO-NU
	for submit <at> 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 <larsi@HIDDEN>) id 1iJkcX-0001aE-HF
 for control <at> 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 <larsi@HIDDEN>) id 1iJkcU-0005Cx-QS
 for control <at> debbugs.gnu.org; Sun, 13 Oct 2019 22:37:40 +0200
Date: Sun, 13 Oct 2019 22:37:38 +0200
Message-Id: <87d0f08jql.fsf@HIDDEN>
To: control <at> debbugs.gnu.org
From: Lars Ingebrigtsen <larsi@HIDDEN>
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 <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

forcemerge 6149 12440
quit






Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.