From owner-freebsd-questions Wed May 29 21:35:37 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mail.halplant.com (ip68-100-145-31.nv.nv.cox.net [68.100.145.31]) by hub.freebsd.org (Postfix) with ESMTP id 364B037B407 for ; Wed, 29 May 2002 21:35:32 -0700 (PDT) Received: by mail.halplant.com (Postfix, from userid 1001) id 79A2F1D0; Thu, 30 May 2002 00:35:31 -0400 (EDT) Date: Thu, 30 May 2002 00:35:31 -0400 From: Andrew J Caines To: freebsd-questions@FreeBSD.ORG Subject: Re: Send process to background Message-ID: <20020530043531.GF32486@hal9000.halplant.com> Reply-To: Andrew J Caines Mail-Followup-To: freebsd-questions@FreeBSD.ORG References: <011201c20768$d35d1040$6800a8c0@rafter> <20020530031558.GA1146@altair.mukappabeta.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020530031558.GA1146@altair.mukappabeta.net> User-Agent: Mutt/1.3.99i Organization: H.A.L. Plant X-PGP-Fingerprint: C59A 2F74 1139 9432 B457 0B61 DDF2 AA61 67C3 18A1 X-Powered-by: FreeBSD 4.6-RC X-URL: http://halplant.com:88/ Importance: Normal Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Since no-one has stated it clearly yet... It is the shell which provides job control, not the OS. Shells common to many OSs including FreeBSD which have job control include csh, ksh, bash, zsh and tcsh. Since so-called Bourne shells ("sh") these days typically aren't (they're usually ksh, bash, ash, etc. with behaviour modified by invocation), some may have job control. If you're running program "abc" from the command line of a shell with job control, then you'll almost certainly use ^Z to suspend the program, ie. send it a STOP signal and give you your shell prompt back, then type "bg" to tell the shell to continue running it in the background, ie. send it a CONT signal. hostx# abc ^Z [1]+ Stopped abc hostx# bg [1]+ abc & hostx# ... [1]+ Done abc You can avoid this by running abc in the background from the start with "&" at the end of the command, eg. hostx# abc & [1] 53911 If you're thinking of choosing a shell, remember that C type shells (csh, tcsh, etc.) are for perverts and the insane. Use a Bourne-derived shell such as bash, zsh, ksh or your native sh. If you have to be different, take a look in /usr/ports/shells for es, rc, perlsh and other fancy stuff. -Andrew- -- _______________________________________________________________________ | -Andrew J. Caines- Unix Systems Engineer A.J.Caines@halplant.com | | "They that can give up essential liberty to obtain a little temporary | | safety deserve neither liberty nor safety" - Benjamin Franklin, 1759 | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message