Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Really detaching jobs



On Fri, Oct 2, 2015 at 7:38 AM, Dominik Vogt <vogt@xxxxxxxxxxxxxxxxxx> wrote:
>
>
> Yeah, but if I had known *in advance* that I'd have the problem,
> I'd just have used nohup.  So the question is really how to detach
> a running process group from the controlling terminal, and whether
> zsh can help with that in any way (which I guess it cannot).
>

Chances are that the reason the process dies is because sshd has
closed the standard output (the terminal) so it gets a write error.
The only reliable way to detach something is to redirect its outputs
(and inputs), which nohup does.  Once the process is running, there's
(generally) no external way to change those file descriptors, the
shell can't do anything after the fact.

The advantage of something like "screen" is that if you ALWAYS use it,
you can stop worrying about knowing in advance.



Messages sorted by: Reverse Date, Date, Thread, Author