bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compile mode and sh ( ) &


From: Ehud Karni
Subject: Re: compile mode and sh ( ) &
Date: Tue, 30 Oct 2001 19:28:34 +0200

On 30 Oct 2001 14:52:47 +0800, Dan Jacobson <address@hidden> wrote:
> 
> save this in /tmp/a.sh
> 
> echo o
> (echo p;date;echo $$)&
> echo i
> #(echo n;date;echo $$)
> 
> and do (compile " sh a.sh")
> Notice that you see no date, etc.  Now remove the #, you get two
> dates.
> 
> this shows no date:
> (echo p;date;echo q)&
> (echo r;echo s)
> 
> this shows two dates:
> (echo p;date;echo q)&
> (echo r;date;echo s)

This is a problem with Emacs closing the compilation buffer and killing
all sub-processes after the compilation process finished (It is done
by `call-process' [C function] so it is not easily solved). Just add
"sleep 3" at the end of your script and you'll see all your sub
processes output.

A real workaround is to run the subprocess with `nohup' and directing
its output to a file (You won't be able to see it in Emacs buffer 
because Emacs closes the pipes after the process terminate).

Ehud.


-- 
 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-7966-561 Fax: +972-3-7966-667   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \
     mailto:address@hidden    http://www.simonwiesel.co.il



reply via email to

[Prev in Thread] Current Thread [Next in Thread]