From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.ciao.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: some accept-process-output races fixed; Tramp FIXMEs Date: Tue, 22 Jan 2019 18:56:35 +0200 Message-ID: <83womw8wcc.fsf@gnu.org> References: <46ce72ef-c4cb-1cd1-566a-c305ca92e68c@cs.ucla.edu> <80d86b5a-efb7-87cc-a3db-0a6ad356274d@cs.ucla.edu> <875zujlkhv.fsf@gmx.de> Injection-Info: ciao.gmane.org; posting-host="ciao.gmane.org:195.159.176.228"; logging-data="11747"; mail-complaints-to="usenet@ciao.gmane.org" Cc: eggert@cs.ucla.edu, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 22 19:40:12 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gm0xs-0002hf-PS for ged-emacs-devel@m.gmane.org; Tue, 22 Jan 2019 19:40:00 +0100 Original-Received: from localhost ([127.0.0.1]:46985 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm0xr-0005jL-NH for ged-emacs-devel@m.gmane.org; Tue, 22 Jan 2019 13:39:59 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:37481) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm0uz-0004Ja-6l for emacs-devel@gnu.org; Tue, 22 Jan 2019 13:37:02 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59306) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gm0ux-0007pJ-Am; Tue, 22 Jan 2019 13:36:59 -0500 Original-Received: from [176.228.60.248] (port=4992 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1glzLx-0007CF-IA; Tue, 22 Jan 2019 11:56:46 -0500 In-reply-to: <875zujlkhv.fsf@gmx.de> (message from Michael Albinus on Sun, 20 Jan 2019 10:57:16 +0100) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:232604 Archived-At: > From: Michael Albinus > Date: Sun, 20 Jan 2019 10:57:16 +0100 > Cc: Stefan Monnier , emacs-devel@gnu.org > > IIRC, the timeout is used because accept-process-output could be blocked > otherwise. Tramp has often the need to check whether there is still > output from the process, and the timeout is the only way I know that > accept-process-output returns in finite time. > > At least this was the case 15+ years ago, and also supporting XEmacs. If > we could guarantee that (accept-process-output p) returns when either > output has arrived and or the process has finished, I could change the > code. This promise must be kept for all Emacs versions since 24, and for > all platforms, including w32. I don't know about XEmacs (is that still a concern in Tramp?), but in Emacs you can poll a process for output with accept-process-output like this: (accept-process-output PROC 0) AFAICT, this worked in Emacs 24.1 as well.