X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:references:date:in-reply-to :message-id:mime-version:content-type; q=dns; s=default; b=QvzEQ hT7l33GH6mGJQWXJFIX4u8tLDXI8jpuFRKdBpfBshMIGO4/2d4+ttxlGpOi/sUow Hj/EDEWhCqzwvRKSpwHPSEbynryniBVGjBctZQIWdDliKX6VsqZJIT63AeRw9p/p WcVTsFui8+Uc8pd3nojtauplbVYBDmXttUQvQc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:references:date:in-reply-to :message-id:mime-version:content-type; s=default; bh=bWNE2L+Jeli bTdj5P7lZxoTi7CI=; b=gHsKiINThnh/DRv64rRluAjddy+zBBk+VjDGe0D9rBe gesZ6g0lgylYPlLFYvMDTSFCLlcYFjBzKEzGTT/9zf1iEmCL2fn3V//Z4gzKVkg3 aoeSwI0C3gIOZLhawWoBzbcsVYj6Pu+vtGU9n5s0KiPLwWQ/AaMk0Hgye+BON0+s = Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 From: Filipp Gunbin To: cygwin AT cygwin DOT com Subject: Re: emacs 24.3.1: output from async-shell-command is not always displayed References: <86zjhbpf9b DOT fsf AT w2139spb DOT ru DOT yotateam DOT com> <53A0EF03 DOT 8060001 AT cornell DOT edu> <86lhsupj6c DOT fsf AT w2139spb DOT ru DOT yotateam DOT com> Date: Wed, 18 Jun 2014 19:23:35 +0400 In-Reply-To: (Henry S. Thompson's message of "Wed, 18 Jun 2014 14:36:40 +0100") Message-ID: <86ha3i6y2w.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 On 18/06/2014 17:36 +0400, Henry S. Thompson wrote: > Filipp Gunbin writes: > >> 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. > > This sounds very much like it _may_ be the same problem as discussed > (at inconclusive length, sorry!) wrt xemacs in this thread: > > http://lists.xemacs.org/pipermail/xemacs-beta/2014-January/024736.html > > I've burned a lot of midnight oil on that one, with no real joy as > yet. > > At the very least it does seem like there was some change in > Cygwin pty/signal area some time back which affects the way emacsen > try to communicate with sub-processes. . . Thanks Henry, I've tried the earliest snapshot on cygwin.com (2013-12-01) and it behaves the same. One of my scripts (catalina.sh from Tomcat) works fine, but another (ActiveMQ) does not. The difference between them is that catalina.sh just runs `java ... &' and activemq runs `sh -c "java ... &"'. When I remove "sh -c" part it also works fine! So I've modified my test case as follows: echo 'sh -c "touch /tmp/test/${RANDOM}.txt &"' > /tmp/1.sh Now, `M-x async-shell-command /tmp/1.sh' sometimes produces new file in /tmp/test and sometimes not! Strangely, if invoked multiple times, it gives success-fail-success-fail-... Running just "/tmp/1.sh &" from terminal always produces new file. 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