This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: emacs 24.3.1: output from async-shell-command is not always displayed

On 18/06/2014 17:36 +0400, Henry S. Thompson wrote:

> Filipp Gunbin writes:
>> When I call such a script (, 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:
> 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 (2013-12-01) and it
behaves the same.

One of my scripts ( from Tomcat) works fine, but another
(ActiveMQ) does not.  The difference between them is that
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/

Now, `M-x async-shell-command /tmp/' sometimes produces new file in
/tmp/test and sometimes not!  Strangely, if invoked multiple times, it
gives success-fail-success-fail-...  Running just "/tmp/ &" from
terminal always produces new file.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]