6.28. Bash-3.2 and exec /bin/bash --login +h
dbn.lists at gmail.com
Sun Sep 2 07:45:09 PDT 2007
On 9/2/07, Trent Shea <tjshea at telus.net> wrote:
> On Sunday 02 September 2007 08:00, Dan Nicholson wrote:
> > That's fine. I use the temp bash all the time to do the final build.
> That's good to hear; the only difference I noticed was that the second
> bash was compiled to use the readline we install in chapter 6, and I
> wasn't sure if anything depended on that.
Readline is only used when you're in an interactive shell, so it
> > If you wanted to try to switch things midway in a script,
> > you'd have to pass it the input arguments again.
> Thanks, I'm going to try playing with that this week.
It depends what you do with your script and if you keep some kind of
progress marker so that the newly invoked script knows where to pick
up. It's a completely new process, so you'd have to rebuild the
context of what was happening on your own. But basically, if you
stored the input arguments, you'd pass them to the new process, and it
would inherit any exported variables.
#at the beginning
# doin' stuff
# switch to the new bash
exec /bin/bash $args
More information about the lfs-support