[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:51 -0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
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.