From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16298 invoked by alias); 18 Jun 2014 11:10:32 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 16280 invoked by uid 89); 18 Jun 2014 11:10:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: out1-smtp.messagingengine.com Received: from out1-smtp.messagingengine.com (HELO out1-smtp.messagingengine.com) (66.111.4.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 18 Jun 2014 11:10:27 +0000 Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 798E820BC0 for ; Wed, 18 Jun 2014 07:10:17 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Wed, 18 Jun 2014 07:10:17 -0400 Received: from w2139spb.ru.yotateam.com (unknown [178.66.145.65]) by mail.messagingengine.com (Postfix) with ESMTPA id 0A334680200 for ; Wed, 18 Jun 2014 07:10:15 -0400 (EDT) From: Filipp Gunbin To: cygwin@cygwin.com Subject: Re: emacs 24.3.1: output from async-shell-command is not always displayed References: <86zjhbpf9b.fsf@w2139spb.ru.yotateam.com> <53A0EF03.8060001@cornell.edu> Date: Wed, 18 Jun 2014 11:10:00 -0000 In-Reply-To: <53A0EF03.8060001@cornell.edu> (Ken Brown's message of "Tue, 17 Jun 2014 21:44:35 -0400") Message-ID: <86lhsupj6c.fsf@w2139spb.ru.yotateam.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (cygwin) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-06/txt/msg00268.txt.bz2 On 18/06/2014 05:44 +0400, Ken Brown wrote: > On 6/17/2014 2:22 PM, Filipp Gunbin wrote: >> Here are the steps to reproduce. >> >> M-& echo "sleep 1; ps &" > /tmp/1.sh >> >> Then M-& /tmp/1.sh (few times). >> >> On my machine, sometimes it gives the output in the *Async Shell >> Command* buffer, sometimes not. Without "sleep 1" the output is >> displayed almost always. >> >> M-! /tmp/1.sh displays the output always. > > I'm seeing something different, but I'm running a pretest of > emacs-24.4 rather than emacs-24.3. I find that the output is never > displayed, with or without "sleep 1". But if I remove the "&" from > 1.sh, then the output is always displayed (again, with or without > "sleep 1"). Could you try installing the test release emacs-24.3.90-1 > and see if you get the same results I'm getting? I've tried on bzr emacs-24.4.50.1 and what I get is exactly the same as on emacs-24.3. > I don't know if there's a bug here or not. If there is, it's not > specific to Cygwin; I get the same behavior on Fedora 20. > > Do you have a use case for wanting to call asynchronously a command > that's already running asynchronously (because of the "&")? Yes, I usually call asynchronously various startup scripts (Tomcat, ActiveMQ and other). They usually produce some output and start java in background with &. It works from the terminal, but not from emacs. Actually, some time ago it worked from emacs too (I didn't work for some months, so unfortunately I can't tell exactly when it started). When I call such a script (catalina.sh, for example), its output is displayed in *Asynchronous Shell Command*, but the program starting from it with & (java usually) is not started (or started and killed immediately). I supposed that maybe it's killed when the parent process finishes. From looking at lisp code of async-shell-command I can't see anything which differs from shell-command in this way. I tried to narrow the problem and got the case I've posted here initially, but now I think those could be different problems. Anyway, thanks for looking at this. Filipp -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple