Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Nov 2004 20:37:40 -0500
From:      Mike Hauber <m.hauber@mchsi.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: blackbox, bbkeys, and .xinit... (solved) --> UNIX behind the scenes
Message-ID:  <200411042037.41044.m.hauber@mchsi.com>
In-Reply-To: <418A9487.7020300@broadpark.no>
References:  <200411021855.52247.m.hauber@mchsi.com> <200411040521.49689.m.hauber@mchsi.com> <418A9487.7020300@broadpark.no>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411042037.41044.m.hauber>