[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Asynchronous shell command that leaves a background process running
From: |
Sean McAfee |
Subject: |
Re: Asynchronous shell command that leaves a background process running |
Date: |
Wed, 08 Dec 2010 15:32:53 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
pjb@informatimago.com (Pascal J. Bourguignon) writes:
> Sean McAfee <eefacm@gmail.com> writes:
>> All is well when I run this command from an interactive shell, but
>> things fall apart when I try to run it as an asynchronous shell command
>> from Emacs, a la:
>>
>> (shell-command "wrapper-script arg1 arg2 &")
>> [...]
>> Is there a more elegant way to address this problem?
> You can use:
>
> (shell-command "wrapper-script arg1 arg2 & disown")
I tried variations on that, but couldn't find any way to run
wrapper-script asynchronously, receiving its status messages in Emacs as
it runs.
> But really, the problem is with your real-program, which should be doing
> the same as disown (setting a new process group, etc), since it exits
> before its children.
That's problematic, since real-program is a Java program.