Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Oct 2007 13:45:20 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Howard Jones <howie@thingy.com>
Cc:        "Benjamin M. A'Lee" <bma+lists@subvert.org.uk>, freebsd-questions@freebsd.org
Subject:   Re: [freebsd-questions] Dangers of using a non-base shell
Message-ID:  <20071031114520.GC3140@kobe.laptop>
In-Reply-To: <47279664.1050704@thingy.com>
References:  <472647A0.3030009@brookes.ac.uk> <20071030130206.GB1178@gilmour.subvert.org.uk> <47279664.1050704@thingy.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2007-10-30 20:39, Howard Jones <howie@thingy.com> wrote:
> Benjamin M. A'Lee wrote:
>> You could possibly also put "bash -l && exit" in your .shrc, which would
>> exit if bash exited successfully. I haven't tested it, but it should
>> work.
>
> or 'exec bash -l' which will replace the existing shell with bash in
> memory, rather than run it from it as a subprocess. I was going to verify
> that that's the technical explanation, but 'man exec' gets you the utterly
> useless builtin(1) manpage.

It is a fairly ok description of the technical behavior.  See my similar
suggestion for using:

    tcsh# exec env SHELL=/usr/local/bin/bash bash -l
    bash#

> The effect is that you only have to type exit once, anyway.

Yup :)




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