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

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

Re: Asynchronous shell command that leaves a background process running


From: Andreas Politz
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/24.0.50 (gnu/linux)

Sean McAfee <eefacm@gmail.com> writes:

> Andreas Politz <politza@fh-trier.de> writes:
>> Sean McAfee <eefacm@gmail.com> writes:
>>>   (shell-command "nohup wrapper-script arg1 arg2 | cat &")
> [...]
>>> Is there a more elegant way to address this problem?
>
>> Try this.
>>
>> (let ((process-connection-type nil))  ; Use a pipe instead of pty
>>       (shell-command "foo bar blub &"))
>
> Nice!  Thanks.  Shortly after posting my original article, I factored
> out the new-process-group logic into a short wrapper program, so I could
> just say:
>
>   (shell-command "in-a-new-process-group wrapper-script arg1 arg2 &")
>
> That was nicer than anything I'd yet come up with, but your solution is
> even better.

I think Pascals point is still valid: Why can't your script wait for
it's children to die ? 

-ap


reply via email to

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