From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Race condition in eshell-gather-process-output Date: Sat, 19 Jan 2013 13:16:15 +0100 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1358597791 24227 80.91.229.3 (19 Jan 2013 12:16:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 19 Jan 2013 12:16:31 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?utf-8?Q?J=C3=BCrgen_H=C3=B6tzel?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 19 13:16:50 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TwXLq-0002g5-6K for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2013 13:16:46 +0100 Original-Received: from localhost ([::1]:37053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwXLZ-0006vK-90 for ged-emacs-devel@m.gmane.org; Sat, 19 Jan 2013 07:16:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwXLT-0006v4-BC for emacs-devel@gnu.org; Sat, 19 Jan 2013 07:16:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TwXLQ-00061W-Qk for emacs-devel@gnu.org; Sat, 19 Jan 2013 07:16:23 -0500 Original-Received: from mail-out.m-online.net ([212.18.0.9]:44028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TwXLQ-00061G-KC for emacs-devel@gnu.org; Sat, 19 Jan 2013 07:16:20 -0500 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3YpJ0K3Xkvz4KK2B; Sat, 19 Jan 2013 13:16:17 +0100 (CET) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3YpJ0K3Gj0zbbj7; Sat, 19 Jan 2013 13:16:17 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id 4Nyvhr19GTHo; Sat, 19 Jan 2013 13:15:52 +0100 (CET) X-Auth-Info: RwyeigAqF/oD5uVdUuzcxLbNbylkBgKtN04v6XIwRJM= Original-Received: from igel.home (ppp-88-217-98-157.dynamic.mnet-online.de [88.217.98.157]) by mail.mnet-online.de (Postfix) with ESMTPA; Sat, 19 Jan 2013 13:16:16 +0100 (CET) Original-Received: by igel.home (Postfix, from userid 501) id 5D8E7CA2A1; Sat, 19 Jan 2013 13:16:16 +0100 (CET) X-Yow: - if it GLISTENS, gobble it!! In-Reply-To: (=?utf-8?Q?=22J=C3=BCrgen_H=C3=B6tzel=22's?= message of "Sat, 19 Jan 2013 12:28:19 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-Received-From: 212.18.0.9 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:156469 Archived-At: Jürgen Hötzel writes: > (apply 'start-file-process > (file-name-nondirectory command) nil > ;; `start-process' can't deal with relative filenames. > (append (list (expand-file-name command)) args)))) > ---------------------------------------------------------------------------------------- > something can happen meanwhile: The process may have written > output (nil output buffer) > ---------------------------------------------------------------------------------------- > > (eshell-record-process-object proc) > (set-process-buffer proc (current-buffer)) > > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Maybe too late to set output buffer! It isn't. Process output isn't read until accept-process-output is called. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."