[freebsd-questions] Dangers of using a non-base shell

Giorgos Keramidas keramida at ceid.upatras.gr
Wed Oct 31 04:56:13 PDT 2007

On 2007-10-30 20:39, Howard Jones <howie at 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

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

Yup :)

More information about the freebsd-questions mailing list