From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15792 invoked by alias); 2 Oct 2015 15:08:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20681 Received: (qmail 13151 invoked from network); 2 Oct 2015 15:08:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=dwZPci3QNK7m45RXV4qHW58zu9765cc4am1chL2zcYk=; b=XS2exzG/BZCoVrs56jXtXIPQ4FjriciWIRQSVPDum0cEvHoMxh8SzezYa1R+kqb0h3 lfLbLcQHle4CE05FNWVOlixE9K4+NeeElUE0RjZo9Zzg/GOaRegL1pOy6oS8GUTAH07I y7v63r2iaijuQ8r/QK/7DI61Jg/Tm/c/zP2cDNfyPRHF2eoMQj/X5rg9rEFu2aJqVDG5 gj7FCLr2YrKHR1jl/0llIM4pSeR8F4BfkeSdwpSgOhTLm1sBacOO3oXSfHAX4Qxtl/jk fJXhRXS7nLTcacl81HRfT5f4JpOoEgbt17pT9Vpo14gHDPhpSjozhVQxfoPPNRfbiN4b 4KaA== X-Gm-Message-State: ALoCoQndH+19sQMfY8py/dlK/rdHXXpVs+kDE9YdQI9a/NBPHxAIJrQPYLIq+vx5+ltSUAFGemTJ MIME-Version: 1.0 X-Received: by 10.194.77.4 with SMTP id o4mr19328498wjw.4.1443798498697; Fri, 02 Oct 2015 08:08:18 -0700 (PDT) In-Reply-To: <20151002143824.GA5942@linux.vnet.ibm.com> References: <20151002115632.GA13749@linux.vnet.ibm.com> <20151002143824.GA5942@linux.vnet.ibm.com> Date: Fri, 2 Oct 2015 08:08:18 -0700 Message-ID: Subject: Re: Really detaching jobs From: Bart Schaefer To: vogt@linux.vnet.ibm.com, Zsh Users Content-Type: text/plain; charset=UTF-8 On Fri, Oct 2, 2015 at 7:38 AM, Dominik Vogt 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.