From owner-freebsd-questions@FreeBSD.ORG Fri Nov 5 01:34:46 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 78C3716A4CE for ; Fri, 5 Nov 2004 01:34:46 +0000 (GMT) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28C8F43D5C for ; Fri, 5 Nov 2004 01:34:46 +0000 (GMT) (envelope-from m.hauber@mchsi.com) Received: from [10.51.10.3] (12-219-204-133.client.mchsi.com[12.219.204.133]) by sccmmhc91.asp.att.net (sccmmhc91) with ESMTP id <20041105013445m9100cdem3e>; Fri, 5 Nov 2004 01:34:45 +0000 From: Mike Hauber To: freebsd-questions@freebsd.org Date: Thu, 4 Nov 2004 20:37:40 -0500 User-Agent: KMail/1.7 References: <200411021855.52247.m.hauber@mchsi.com> <200411040521.49689.m.hauber@mchsi.com> <418A9487.7020300@broadpark.no> In-Reply-To: <418A9487.7020300@broadpark.no> X-Copyright: 2004, Michael C. Hauber. All rights reserved. X-Notice: Duplication, modification, and/or redistribution are prohibited without proper consent from the author. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411042037.41044.m.hauber@mchsi.com> Subject: Re: blackbox, bbkeys, and .xinit... (solved) --> UNIX behind the scenes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: m.hauber@mchsi.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 01:34:46 -0000 On Thursday 04 November 2004 03:43 pm, you proclaimed: > Mike Hauber wrote: > > On Wednesday 03 November 2004 09:25 pm, Parv proclaimed: > >>in message <200411031739.23987.m.hauber@mchsi.com>, > >> wrote Mike Hauber thusly... > >> > >>>I discovered that with the line "blackbox & bbkeys" in > >>>the script, the bbscript remains when I exit blackbox, > >>>and I have to close bbscript to return to KDM. > >> > > Greetings! > > Consider this: you start a shell script that in turn runs > the two commands, right? If you do > > blackbox & bbkeys > > this puts blackbox in the background and runs bbkeys in > the foreground. Now, if you close blackbox, bbkeys is > still running, and thus the shellscript will also keep > running (seeing as how the script is the parent process > of bbkeys). > > On the other hand, if you do > > bbkeys & blackbox > > this will send bbkeys into the background and keep > blackbox in the foreground. Now, when you exit blackbox, > the shellscript will have reached the end of its > execution (seeing as how all the children for which it > has been told to wait have terminated) and will > terminate. Being a child process of the script, bbkeys > will also terminate as a result of this. > > I don't know if it's easier to see if I write it out as > > blacbox& > bbkeys > > vs. > > bbkeys& > blackbox > > Did this make things more clear? :-) Okay. I can understand where I was getting confused. I couldn't figure out why it seemed to work one way but not the other (just seemed weird). I now see the error of my own processes, and will return myself to the background. :) Thanks (Parv, Henry, and Henrik) for clearing this up. Mike