From owner-freebsd-stable@FreeBSD.ORG Thu Mar 8 14:30:12 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4C96D16A400 for ; Thu, 8 Mar 2007 14:30:12 +0000 (UTC) (envelope-from attos.janus@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.173]) by mx1.freebsd.org (Postfix) with ESMTP id CC18113C4B2 for ; Thu, 8 Mar 2007 14:30:11 +0000 (UTC) (envelope-from attos.janus@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so905272ugh for ; Thu, 08 Mar 2007 06:30:10 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HeSNdAOGomFeylKJQIBARNgFH0bCoPb8h7OanPvCYFJkmclHl5tB9/H26xG7ld4W4VrvRDcN9Noy/aNwJ0PwZCUg5m7VUDEtTJzzfMsQeeDGAOg3nciR1MjGSw8FWa5bBzA8NYHAavFfIBDOm3Msn8d18/Uqze/hcOtYs7PvXaM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=S9g8wKMjy0nicstEe/nRpB1GW/z0ePVAtvoTpNWgTcB6zigCyZeAHRxv5i7nZ7jxnrk3KmflWvuclMG75eNsoayVwsDyzv+eSrVB55DBHFEsk2H4hPNUuaZo9y3hdi7fmeRt0yF2T/489ThqEj3FUCE7rsQoa7HCQRGUPpS8NYY= Received: by 10.114.78.1 with SMTP id a1mr159585wab.1173362634242; Thu, 08 Mar 2007 06:03:54 -0800 (PST) Received: by 10.114.59.4 with HTTP; Thu, 8 Mar 2007 06:03:54 -0800 (PST) Message-ID: <5297d6fd0703080603j5170c508raa64d08204d8d0c0@mail.gmail.com> Date: Thu, 8 Mar 2007 09:03:54 -0500 From: Attos To: sthomas@nerim.net, freebsd-stable@freebsd.org In-Reply-To: <20070308133157.GA96143@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <52267.194.69.32.50.1173359004.squirrel@webmail.nerim.net> <20070308133157.GA96143@icarus.home.lan> Cc: Subject: Re: Background process X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Mar 2007 14:30:12 -0000 Look into sysutils/screen There are several tutorial on how to use it. On 3/8/07, Jeremy Chadwick wrote: > On Thu, Mar 08, 2007 at 02:03:24PM +0100, sthomas@nerim.net wrote: > > Hello, > > > > I connect to my freebsd box via ssh using putty from a WindowsXP > > workstation, I want to run a process on the freebsd box, then close my ssh > > session (closing putty) while keeping the process running. > > > > So I run my process like this : # myprogram &, then I exit the shell. > > > > But when I do that, I can see with ps that my process go from "TT" "p0" to > > "TT" "p0-" and the application doesn't work anymore. For information, the > > program I want to be able to run via ssh then close the ssh session is the > > moinmoin wiki which is a wiki written in python. > > > > In man ps I can see that the trailing "-" after "p0" means my process can > > no longer reach the controlling terminal... But what can I do to achieve > > my goal ? > > The program you're using obviously needs a tty/pty open for it to > function. Possibly it's trying to output to stdout or stderr and > cannot due to tty/pty being taken out underneathe it. > > Other *IX people here can give you some alternate advice, but I'd > recommend these options: > > 1) Under sh/bash: myprogram 1>/dev/null 2>&1 & > (or replace /dev/null with a logfile of your choice) > > 2) Use dtach (ports/misc/dtach) and detach your program. > http://dtach.sourceforge.net/ > > 3) Use GNU screen (ports/sysutils/screen) and run your program > within that. > http://www.gnu.org/software/screen/ > > -- > | Jeremy Chadwick jdc at parodius.com | > | Parodius Networking http://www.parodius.com/ | > | UNIX Systems Administrator Mountain View, CA, USA | > | Making life hard for others since 1977. PGP: 4BD6C0CB | > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > -- Attos Janus