emacs 24.3.1: output from async-shell-command is not always displayed
Filipp Gunbin
fgunbin@fastmail.fm
Wed Jun 18 15:23:00 GMT 2014
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
More information about the Cygwin
mailing list