From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Short explanation for & in key ! of dired Date: Wed, 25 Jun 2008 14:52:27 -0400 Message-ID: References: <87hcbkpo0e.fsf@gmail.com> <86y74wzeq1.fsf@lola.quinscape.zz> <874p7ifonh.fsf@jurta.org> <853an2oupp.fsf@lola.goethe.zz> <7dbe73ed0806251103h21b6c7a7t4031d234988f14f9@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1214419985 19448 80.91.229.12 (25 Jun 2008 18:53:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 25 Jun 2008 18:53:05 +0000 (UTC) Cc: Juri Linkov , Daniel Clemente , emacs-devel@gnu.org, joakim@verona.se, Miles Bader To: "Mathias Dahl" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 25 20:53:49 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KBa7Y-00007D-Cn for ged-emacs-devel@m.gmane.org; Wed, 25 Jun 2008 20:53:32 +0200 Original-Received: from localhost ([127.0.0.1]:58679 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBa6i-0006J3-M0 for ged-emacs-devel@m.gmane.org; Wed, 25 Jun 2008 14:52:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KBa6d-0006Io-BM for emacs-devel@gnu.org; Wed, 25 Jun 2008 14:52:35 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KBa6b-0006IZ-Pj for emacs-devel@gnu.org; Wed, 25 Jun 2008 14:52:34 -0400 Original-Received: from [199.232.76.173] (port=33370 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KBa6b-0006IW-KH for emacs-devel@gnu.org; Wed, 25 Jun 2008 14:52:33 -0400 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:34610 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KBa6X-0006RX-0b; Wed, 25 Jun 2008 14:52:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiYFADkwYkhFxIdG/2dsb2JhbACBW7IQgW4 X-IronPort-AV: E=Sophos;i="4.27,703,1204520400"; d="scan'208";a="23200556" Original-Received: from 69-196-135-70.dsl.teksavvy.com (HELO pastel.home) ([69.196.135.70]) by ironport2-out.teksavvy.com with ESMTP; 25 Jun 2008 14:52:27 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id EAF048130; Wed, 25 Jun 2008 14:52:27 -0400 (EDT) In-Reply-To: <7dbe73ed0806251103h21b6c7a7t4031d234988f14f9@mail.gmail.com> (Mathias Dahl's message of "Wed, 25 Jun 2008 20:03:10 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:99942 Archived-At: >> To achieve this I today have to do this in dired: >> ! gimp ? & RET > Speaking of Gimp, and going a bit off-topic here, can anyone explain > why I cannot seem to run gimp-remote in the same fashion? I do this: > ! gimp-remote ? & > And it finishes right away without opening Gimp. The only way I can > start it is by doing: > ! gimp-remote > But for some reason that locks up Emacs, although that does not happen > if I run it from Bash. > Is this an issue in gimp-remote, Emacs, or a combination? My guess is that gimp-remote does a "fork&exit" and then does its task. So "gimp-remote ? &" fails because as soon as the async process exits, Emacs will close the pipe to that process, which is apparently kills the forked process as well. And inversely "gimp-remote" fails to terminate because Emacs's sync processes wait for the proces to close stdin&stdout, but the forked process still running doesn't close them, for some reason. Hopefully we can make Emacs behave more like regular shells, but I don't know enough about Unix process programming to fix it. Any taker? Stefan