From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs Subject: bug#56025: 29.0.50; em-extpipe-test-2 times out on EMBA and Cygwin Date: Wed, 6 Jul 2022 18:33:45 -0400 Message-ID: <18e79c02-3a2a-77d1-3798-33711f52d6b9@cornell.edu> References: <8e21db9c-0100-998e-f280-81304e7ff61a@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> <8735frmjrr.fsf@athena.silentflame.com> <4676f52c-4758-38df-f0f4-dbcb5d848c1b@gmail.com> <8735fr2kq6.fsf@melete.silentflame.com> <10cf6a90-f86a-b0df-4dc2-c258b7494158@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29601"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cc: larsi@gnus.org, 56025@debbugs.gnu.org To: Jim Porter , Sean Whitton , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 07 00:34:26 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 1o9DbF-0007Mm-UY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Jul 2022 00:34:26 +0200 Original-Received: from localhost ([::1]:44238 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o9DbE-00025V-6s for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 06 Jul 2022 18:34:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o9Das-00024I-8P for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 18:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33217) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o9Dar-0006uE-VR for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 18:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o9Dar-0002yg-MT for bug-gnu-emacs@gnu.org; Wed, 06 Jul 2022 18:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ken Brown Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 06 Jul 2022 22:34:01 +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.165714683911437 (code B ref 56025); Wed, 06 Jul 2022 22:34:01 +0000 Original-Received: (at 56025) by debbugs.gnu.org; 6 Jul 2022 22:33:59 +0000 Original-Received: from localhost ([127.0.0.1]:55347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9Dap-0002yP-Ak for submit@debbugs.gnu.org; Wed, 06 Jul 2022 18:33:59 -0400 Original-Received: from mail-mw2nam10on2101.outbound.protection.outlook.com ([40.107.94.101]:45152 helo=NAM10-MW2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o9Dal-0002yA-3L for 56025@debbugs.gnu.org; Wed, 06 Jul 2022 18:33:58 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CKC3OF6wdwWjkq35cyS1JG99ru4y0AUCo3OqKrqmuw2RA2wlAwlFMKEI/QwzQcuQP2aOfugFX0aKsI9zLWo7Ku+94b75ewkIa5p6WP0QvauvxM3g5QdBzZmCfb8nVEbe8otA27YfGEawqN0GPyC2DvE2qzqazfYC8i5Wvc7tba1uaoHzWv6l0tVU67yQmCgCpK1ZmX7OSwHYFwkx5HzuwWktGX3UWJoQnkiWDeY9jEPGykdn7zFQYZe4ktzxtGX/O10Rx747icigHVuSNI0ph2ZYjzjUKw2e30/DuhRbAsfNR0QM4csJndKvf+2QlsQMYfxFW4Czg0M9Ob4DNQCGfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=W8hXdQdLiG7qPdUNkHr+3tj7vNsAkZQVxaAH7ExKSq4=; b=mJvExaJ2gEJzQ+YghFobGnRmPHW0ZvzcFwDoZyv7oz1Y/THIQLABpH063NrE4mla/S6bCI+mOR4zpGQRKOtv6gu/L2DbDG7aCrqDzQ73WYTQ4dLYtv5NY49AZW37Toy6Qzyew+4Pi5eL69tLPeOk6GE1cYm4cQDPcKc+Xn+rNib/MTRgzjiDHFNrj/IVG/oG7lq+uM4Xe2wqXmuLm6qvSvdpzM1+vDxuxf2y10SwmLyD6lCh73dTfC6iRfgVBbFNvf0rvnX3WWphOX/BmDtZSdURnIbYVx/zCHEPuBCSNtlTh0VH7W+0KKkWAspYiS8kA+HLgCPljwtZSHTCtDrrTw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cornell.edu; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W8hXdQdLiG7qPdUNkHr+3tj7vNsAkZQVxaAH7ExKSq4=; b=CPF7rtkr0dc6f3aVBcmAmvyaLSpedCGO51tWGfajmtdvFyr1rBG5oWabTAQiE9ZgauYp7OUn1UQiMOMiPQtc8JH+f4I6qj48H+8GXl9QaAOp70KjDPosKH5WKu4mbW+D9bHcfxLBUsB1p/koqEeJL1LiT2TKHDzsIjlImzhEVYc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cornell.edu; Original-Received: from BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) by MWHPR04MB0174.namprd04.prod.outlook.com (2603:10b6:300:7::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Wed, 6 Jul 2022 22:33:47 +0000 Original-Received: from BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::901f:a758:30f5:309d]) by BN7PR04MB4388.namprd04.prod.outlook.com ([fe80::901f:a758:30f5:309d%2]) with mapi id 15.20.5417.016; Wed, 6 Jul 2022 22:33:47 +0000 Content-Language: en-US In-Reply-To: <10cf6a90-f86a-b0df-4dc2-c258b7494158@gmail.com> X-ClientProxiedBy: MN2PR15CA0042.namprd15.prod.outlook.com (2603:10b6:208:237::11) To BN7PR04MB4388.namprd04.prod.outlook.com (2603:10b6:406:f8::19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5a0ddf05-b709-42e4-e294-08da5f9f9774 X-MS-TrafficTypeDiagnostic: MWHPR04MB0174:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LNDkLuIfTTvJi0sD1NGvFhpPm/31XqamZkB0aMjqb6lTTAVSyi7OJeqGG0JWz8Shk82uu8ZrxAKhn/U/ljHAXluKkcmdusDT57wuRgcNGtXaAeTc72KvVp4E7EvWt2C7huAqvMK4FST/FBlmAYCMEkeyFkepboth+KJdq2Mg0yHoQYGcIlfAOVBRBuo7/gV/j4H8aTxtq8JXJmuJOHc4N/4/fXtz2j/WQI0RxebMy1RM1IwyxdIWmV3Pdbf8Uy7N0UJDfP8SSIZABFommDMyhciiWZbirGyQn71XmYIOAILS0AOGRewRh73pSfGnD0ujFmBjslYXVl/MATuxuyg87OLVpU32eCjs+jDwEY3YaMMS7UhH9/3YayOD/8cfkJNwMolqy0fOWL+o6gWrokDYLP6i2d7w0fyFMwZQh7h5EgZW3mD+1aeh8Ot94LhytB7QBZg0j7V83UJhQ0w+9W1dPpxwI0lBxC4TfPl1cHVLP5uvhyHDLaCofSX3CoMo/uL6qLCThliHWIIRcC5scC3xTeVtZwTgflO9MMRdwhHowXX7riSuR0ckhrQH9mWs3Xl46/ZxqeKv/RIghDRbt4Ih5zRsotg17qwT/fHrut6o8SizkPnQVG13UYYGe86G906rnyF8ubeJbLfjTW3RShxGMP+eMqvH/0jRgFdgEZxak5yEe+9ftwNR53+5Z+LwZGi0WInrO9fqJ0FngwHeTO66Dd56k+qwu+L1h3TC75JOp4F01lQXqkx/FcNOK+52K GsCloUSORkYerGjxDcK2LAV3EzHsCdPabGb3q/PExKYttmDR4Yu94w7AE5RgN+MiI1LlajWV1E2rJVxInEquyS9NrpkYo4Lktg X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN7PR04MB4388.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(4636009)(376002)(136003)(396003)(366004)(346002)(39860400002)(8936002)(31696002)(38100700002)(6512007)(6486002)(8676002)(41320700001)(478600001)(66556008)(66946007)(75432002)(66476007)(5660300002)(86362001)(2616005)(4326008)(186003)(53546011)(36756003)(316002)(786003)(31686004)(2906002)(6506007)(83380400001)(110136005)(41300700001)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CNRhIWfvxM7VEp8WXDcADty5WY+jk+/oqsVC96QgYP7EgcvLU5kNLZMS5j/leFsweXrkDw4Vopn6AyiWVILRx53ov9AxUugHMl9TbeuG5cEemHpGYVbtBYiAJI3BUeVTeWIKdHLi4X1crD0CaZXt9gv4svoiLV/RMJpHNku+bHCoiIIonB59LqoHHOL047VKt4AANb63VH5Y7d3g10iv2wBnM2GamA2BdPjtXNHaqUxXKd4/E0Dom1uKMi/w4Ly9usWNDNoRywluw42pjLWE6bY7Nn8Sc/VQG4PRf4RhQQN/RDDCfQTRsY9pEt5LcZ86Aw9KapX65H8/ypiuValzPUzwTHCl5E/sp0gMFzHnpuS6B5/uTflFzRBF5yTGM1teb+yVbUM5hY53/Wl17J65IaVInr5LWaCJ7YL3PoypOZCx4+hE1P3LFkUIbHeMue5Yntcgl4zXoJnWAM6IlrtVtj+HWxVrHjl3ZqehmvKo8vgw7HVoGYuVSOv+rTepjoYuowl4ZPQJyPdRatov3tZtf2ygti74UXxNimDwwx8lEtiec7qRSY95eNpszLbALF979eObxDVG6sKkbaR9hvoiNVgNq6jNzj3mV9o24tSj0QV9Yc0XDpSCfCs66zlgi1W4BuzdimCYmowHrOB2mjEIRQqs0qWAJwy/liteeTworruwjdQyaCT1aB9OxKSjfY+wkGTQQwO0SHsCIsmeWC7gDAu/JvZ0jXpfsyVVOgzIxUgOMMTOxTQw91nfsP eFkwUGAhQUPf8WcYeO9tB9eCLpPZA4tPWWrnY+wXGsA+Cb4lvYQkmj0D+5gQGWrQNyMIIt0ca0MKZKzgWTYsakKKzGOfU1fGun X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: 5a0ddf05-b709-42e4-e294-08da5f9f9774 X-MS-Exchange-CrossTenant-AuthSource: BN7PR04MB4388.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2022 22:33:47.4617 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TcZedtRV7O/s/VTi7SpdW/NK6RQBFpZ12d5uC889MNxXPEl6lfb/on1K4j4YoWpkBvSckFHh4YKJ8++mWEiF2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR04MB0174 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:236304 Archived-At: On 6/30/2022 11:52 PM, Jim Porter wrote: > On 6/27/2022 2:19 PM, Ken Brown wrote: >> On 6/27/2022 3:18 PM, Jim Porter wrote: >>> I'd be very hesitant to do this, since as you mention above, this seems like >>> a timing issue, and it's entirely possible that there are other, more >>> widespread issues on Cygwin here. We'd also want to check the system that the >>> process is actually running on; otherwise, remoting into a Cygwin system (via >>> Tramp) would still exhibit the problem. I'll see if I can get a Cygwin >>> environment up to test things out in the next week-ish. >> >> OK, thanks.  Let me know if you need any help with that. > > Ok, I've got Cygwin set up (though I'm just using the prebuilt Cygwin Emacs for > now). I can confirm that the following hangs until I send another EOF via `C-c > C-d': > >   echo hi | rev Yes, but that's because of the behavior of certain platforms (e.g., Cygwin and Solaris) with respect to EOF, as I said in an earlier message. We've changed that for Cygwin, so that Cygwin now behaves the same as GNU/Linux, but the change won't take effect until Cygwin 3.4.0 is released. In any case, that issue has already been fixed on the master branch. Aside from that issue, I never had an issue with echo hi | rev but only with echo hi | sh -c rev I have no idea why that should be different. > However, if I evaluate the following first, the above command works just fine: > >   (add-to-list 'eshell-needs-pipe "rev") > > Normally, Eshell starts each process using ptys to control them. However, the > above Elisp code tells Eshell to use a pipe for "rev"[1]. That makes sense. You're no longer relying on Eshell sending EOF to rev, but rather you're letting rev discover EOF because no process holds the pipe open for writing, forcing any pending read to stop blocking. And, for the same reason, evaluating (add-to-list 'eshell-needs-pipe "sh") solves the problem with "echo hi | sh -c rev". > I'm not totally clear > on all the subtleties here, but it seems to me that it would make more sense for > rev to use a pipe for its stdin and a pty for its stdout. That's not possible > with subprocesses in Emacs though (as far as I know). > > However, I don't think this fully answers things, since I also see inconsistent > results if I run "echo hi | rev" a bunch of times. Sometimes it prints "ih" and > then I need to hit `C-c C-d` once to stop it. Other times it doesn't print > anything and I need to hit `C-c C-d' twice. Interesting. I've never seen that. It's as though "rev" just didn't get one of the EOFs. > There must be some kind of race > condition, maybe in Emacs's src/process.c? I'll poke around, but I'm no expert on how this all works. Ken