From owner-freebsd-questions@FreeBSD.ORG Fri Mar 26 04:27:39 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB28316A4CE for ; Fri, 26 Mar 2004 04:27:39 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1BF2E43D1D for ; Fri, 26 Mar 2004 04:27:39 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i2QCRXWn057238 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 26 Mar 2004 12:27:33 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i2QCRV2V057103; Fri, 26 Mar 2004 12:27:31 GMT (envelope-from matthew) Date: Fri, 26 Mar 2004 12:27:31 +0000 From: Matthew Seaman To: Robert Storey Message-ID: <20040326122731.GC93415@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Robert Storey , freebsd-questions@freebsd.org References: <20040326092248.4845573e.y2kbug@ms25.hinet.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RIYY1s2vRbPFwWeW" Content-Disposition: inline In-Reply-To: <20040326092248.4845573e.y2kbug@ms25.hinet.net> User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk X-Virus-Scanned: clamd / ClamAV version devel-20040316, clamav-milter version 0.67l cc: freebsd-questions@freebsd.org Subject: Re: log off with process running X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Mar 2004 12:27:40 -0000 --RIYY1s2vRbPFwWeW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 26, 2004 at 09:22:48AM +0100, Robert Storey wrote: > OK, that download might run for hours. I don't want to stay connected for= hours, > I want to log off and hang up the modem. The question is, how to do so? W= ith the > above process running, I can't even get back to the command line to type = "exit" > (and wouldn't typing "exit" kill any process I'm running?). Ditto if I hit > ctrl-c. I suppose I could just hang up the modem, but that's not elegant. Others have posted a number of useful solutions to this sort of problem. However all of those solutions require a deal of forethought. Suppose you've got a long running process hogging the foreground of your shell, and you want to background it. All you need do is hit Ctrl-Z to stop the process and then 'bg' to restart it in background. If you've got a lot of jobs running concurrently in a shell you might need to tell the shell which one to background, which you do by: 'bg %n' -- 'n' is the job number, as returned by the 'jobs' shell built-in command. Putting the process into the background like that is usually enough to protect the process from being killed when you log out, although different shells can behave differently in that respect. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --RIYY1s2vRbPFwWeW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAZCGzdtESqEQa7a0RArbXAJ9CeqFMOlwnZ4pTPGEsiJ35gpRKAQCcCjGH exWMn+9e6QMkJUfid8jIAAE= =CJIx -----END PGP SIGNATURE----- --RIYY1s2vRbPFwWeW--