From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter Newsgroups: gmane.emacs.bugs Subject: bug#56025: 29.0.50; em-extpipe-test-2 times out on EMBA and Cygwin Date: Fri, 24 Jun 2022 16:03:13 -0700 Message-ID: References: <8e21db9c-0100-998e-f280-81304e7ff61a@cornell.edu> <87mtecl82o.fsf@athena.silentflame.com> <40d9e52f-2041-b341-ff77-546ca7792791@cornell.edu> <87k09elrf8.fsf@athena.silentflame.com> <1de33903-4c55-e043-3754-726f7044f2d0@cornell.edu> <7e7daa2f-dbbc-cd0a-4958-2a2932b17837@gmail.com> <8974408d-91cd-aebd-7a5b-596a57bd640e@cornell.edu> <17d41105-b006-f9ad-af0b-ece84a7f5248@gmail.com> <040b3a36-459b-a94d-f879-7f45aac50bda@cornell.edu> <83sfnud26o.fsf@gnu.org> <96e47ba7-efaa-b6df-dd98-60f09068e68c@gmail.com> <874k097lbh.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34554"; mail-complaints-to="usenet@ciao.gmane.io" Cc: larsi@gnus.org, 56025@debbugs.gnu.org To: Sean Whitton , Eli Zaretskii , Ken Brown Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 25 01:04:10 2022 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 1o4sLS-0008ky-8q for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 25 Jun 2022 01:04:10 +0200 Original-Received: from localhost ([::1]:47724 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4sLQ-0007mi-GG for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 24 Jun 2022 19:04:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48034) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4sLK-0007mO-QU for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 19:04:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49912) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4sLK-0001vC-IO for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 19:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4sLK-0007eV-Bv for bug-gnu-emacs@gnu.org; Fri, 24 Jun 2022 19:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 24 Jun 2022 23:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56025 X-GNU-PR-Package: emacs Original-Received: via spool by 56025-submit@debbugs.gnu.org id=B56025.165611180329364 (code B ref 56025); Fri, 24 Jun 2022 23:04:02 +0000 Original-Received: (at 56025) by debbugs.gnu.org; 24 Jun 2022 23:03:23 +0000 Original-Received: from localhost ([127.0.0.1]:43809 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4sKh-0007dY-EH for submit@debbugs.gnu.org; Fri, 24 Jun 2022 19:03:23 -0400 Original-Received: from mail-pg1-f179.google.com ([209.85.215.179]:34562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4sKf-0007dK-24 for 56025@debbugs.gnu.org; Fri, 24 Jun 2022 19:03:22 -0400 Original-Received: by mail-pg1-f179.google.com with SMTP id g186so3701712pgc.1 for <56025@debbugs.gnu.org>; Fri, 24 Jun 2022 16:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=bO4Odkk6XVhIbB2rpkqBGbX8sPv9RgZkvXTa+X8vWsU=; b=DBmIAKVRCuMwELfKV6NXFzVkFH+9nuc5zwipod7QswjO87gfEV8egfXqSnMRlj0cRx 9i90lVKIcY3pghgP9iqOPwNFoc9KYRRyLLGY4jlIHUQ+igE9gonL9oLd/EpnkFyog8JP rYFk+fCV6woTqJIRRYyJ+GhGVu7PewBr5qVXMHG8NN9p5h7FtcO9JhaljEewogLpPBtE Ru2bZbvXm+BPu7bFnJm5o2K3QXw6BxCz0SlXvaP3Ef6EpOulwiHNes6h/mjaLvf3KQya e3McsqjKUM0w/0cPxQQt5xSbva+GTldWsk11U7dC/cf+giGPACX657tTK5k7kej1Y1r+ PQyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=bO4Odkk6XVhIbB2rpkqBGbX8sPv9RgZkvXTa+X8vWsU=; b=QqUXyXhLjV2G0l+YS8/AGnUu6Uq2aNIMK24v/nTjZXgDvlxsLhHoq1Hb1cO3yzNadr Bif0ri4ZDGiP5hsYehWf+FRRfeQu9WYbJLP0TRc9GYc2iGLjHDk5JenzD6LHpCL5romH 9DLQ76V5LTVpYKJ1kyjtdkd2OEMhV3csBmgTNSuR9/TiT0URC9mrJFDUuIkqlbWqPSJb qn82o1fDDtiqXFyAPvfgSfPY8Xz26p1qc0DDZVuDbg9vJ002xtNnRCG+9jOU3J6KGbDF QW+5tE8/Xd850M9olD1VZP6bXK8QyefKdBGIy1pXSZiWsPpKc4KvDdq6JJszC9u2EHSj SBUQ== X-Gm-Message-State: AJIora+C+R+eXi9wQ50e06UyiMrCN1bt44ELz07aoiEu34ogh/r8GUjA sRKWr1rx5KdSzWW+s2YCnacUbi8XaBc= X-Google-Smtp-Source: AGRyM1uRZvguOuPhLxwDnFjyAQ3C2vkrZiKIpwFLk9KWVmS4JJq/ZXjP5OD5uViUFB5F4S8HYRM+JQ== X-Received: by 2002:a62:ce8a:0:b0:525:706f:14c9 with SMTP id y132-20020a62ce8a000000b00525706f14c9mr1437825pfg.55.1656111795114; Fri, 24 Jun 2022 16:03:15 -0700 (PDT) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id p24-20020a170902a41800b001635a8f9dfdsm2334330plq.26.2022.06.24.16.03.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 24 Jun 2022 16:03:14 -0700 (PDT) In-Reply-To: <874k097lbh.fsf@melete.silentflame.com> Content-Language: en-US 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" Xref: news.gmane.io gmane.emacs.bugs:235228 Archived-At: On 6/24/2022 3:23 PM, Sean Whitton wrote: > On Fri 24 Jun 2022 at 09:53AM -07, Jim Porter wrote: > >> How about the attached patch? I didn't check for specific platforms to >> enable the "third EOF" behavior, since a) it's hard to say for sure >> which platforms might have this issue (especially since Cygwin will be >> fixing it), and b) this lets us avoid worrying about Tramp compatibility. > > Avoiding the TRAMP issues makes sense, but could you explain why you > don't think there could be an issue with sending a process too many > EOFs? It's not immediately obvious to me. Eshell was already sending too many EOFs in some cases, and we haven't seen any issues with it (that I know of). For example, consider the command: *echo hi | rev In this case, we send the string "hi\n" over the pipe, followed by 2 EOFs (one from the stdout handle and one from the stderr handle). The POSIX standard says[1] (thanks to Eliot Moss on the Cygwin mailing list for citing this passage): When [EOF is] received, all the bytes waiting to be read are immediately passed to the process without waiting for a , and the EOF is discarded. Thus, if there are no bytes waiting (that is, the EOF occurred at the beginning of a line), a byte count of zero shall be returned from the read(), representing an end-of-file indication. I interpret that to mean that the preferred way to indicate end-of-file to `rev' in this case is to send it "hi [NL] [EOF]". The second EOF that Eshell sends when closing the stderr output handle is superfluous, but it works fine as far as I can tell. [1] https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap11.html