From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.devel Subject: Re: Async commands in M-x compile Date: Wed, 30 Jun 2010 12:01:27 +0200 Message-ID: <871vbokfew.fsf@gmail.com> References: <87d3v9mpcq.fsf@gmail.com> <87tyokyiro.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1277918140 1603 80.91.229.12 (30 Jun 2010 17:15:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 30 Jun 2010 17:15:40 +0000 (UTC) Cc: , emacs-devel@gnu.org To: Thien-Thi Nguyen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jun 30 19:15:38 2010 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.69) (envelope-from ) id 1OU0ss-0003ea-2V for ged-emacs-devel@m.gmane.org; Wed, 30 Jun 2010 19:15:38 +0200 Original-Received: from localhost ([127.0.0.1]:50649 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OU0sr-0005Il-8l for ged-emacs-devel@m.gmane.org; Wed, 30 Jun 2010 13:15:37 -0400 Original-Received: from [140.186.70.92] (port=59480 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OTu6r-0003JD-8S for emacs-devel@gnu.org; Wed, 30 Jun 2010 06:01:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OTu6o-0007hp-Qx for emacs-devel@gnu.org; Wed, 30 Jun 2010 06:01:37 -0400 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:33699) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OTu6o-0007hb-MK for emacs-devel@gnu.org; Wed, 30 Jun 2010 06:01:34 -0400 Original-Received: by fxm17 with SMTP id 17so337682fxm.0 for ; Wed, 30 Jun 2010 03:01:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:cc:subject :references:date:in-reply-to:message-id:user-agent:mime-version :content-type:content-transfer-encoding; bh=tPfBUPc4tXBYuKdPUL/1sg+VTGgM/TKFBWC4CVoQ6x4=; b=Wx4OzXDfL5FI5+RoUPzvmpXRiWaYpu0bk3FR7Sl5ZFO+/ljNg2k5IAcYiLPlvdc3eG 9qAlXxcBAmhxEOeQMdIiZ+suO8ehf+uUcMtzTXZKVMj3VM2n4xV2Supc67ES2Y3ZiYxr XANhHIn4t0blInLdu1Rpgizrr/BwE+N5Jd0U0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; b=Vp9kgU08+lUyDymmX1MJ73PUmoQ39hgM0SGVi2z0rpMmdPsz2jpyY2WuIF0eKCkOO4 NcfKlNjzmlptXGLke1u5ixnrjYwYNYWzUHaoE9zCq+npdLRkqUEn7MLdjsX08/kDC5Fc YzMQQVn6of7ngWEIN7Ktf4VmsVwAEB51RkG30= Original-Received: by 10.87.70.19 with SMTP id x19mr12138245fgk.14.1277892092016; Wed, 30 Jun 2010 03:01:32 -0700 (PDT) Original-Received: from lambda (uni14-1-82-233-220-106.fbx.proxad.net [82.233.220.106]) by mx.google.com with ESMTPS id d4sm15347782fga.14.2010.06.30.03.01.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 30 Jun 2010 03:01:31 -0700 (PDT) In-Reply-To: <87tyokyiro.fsf@ambire.localdomain> (Thien-Thi Nguyen's message of "Wed, 30 Jun 2010 11:25:15 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Wed, 30 Jun 2010 13:12:35 -0400 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:126538 Archived-At: Thien-Thi Nguyen writes: > () Antoine Levitt > () Wed, 30 Jun 2010 00:43:49 +0200 > > Can someone explain to me why compile doesn't support > asynchroneous commands, and especially why it silently > fails instead of displaying an error message? I don't > understand the mechanism involved here. > > As a test, try M-x compile with > "echo test > ~/test &" or "xclock &". > > I think you mean to ask for "background" (job control) support. > M-x compile is already asynchronous. > > If you want to the child process to not exit after it places > its own children processes in the background, you need to > tell it to =E2=80=98wait=E2=80=99, e.g.: > > M-x compile > xclock & wait > > Note that if you kill the *compilation* buffer, or interrupt > (via =E2=80=98C-c C-k=E2=80=99 aka =E2=80=98kill-compilation=E2=80=99) th= e child process, > most likely all of its children will likewise terminate. > Details depend on shell used and how that is initialized. > > thi I should have been clearer. I really want to start a background job, but the job doesn't start: when I do xclock &, it just returns without starting xclock. "xclock & wait" works fine (so does "xclock" for that matter), but the point is I don't want to wait for the process to finish.