From owner-freebsd-questions@FreeBSD.ORG Wed Oct 31 11:56:12 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E973816A46B for ; Wed, 31 Oct 2007 11:56:12 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 43DE913C49D for ; Wed, 31 Oct 2007 11:56:12 +0000 (UTC) (envelope-from keramida@ceid.upatras.gr) Received: from kobe.laptop (vader.bytemobile-rio.ondsl.gr [83.235.57.37]) (authenticated bits=128) by igloo.linux.gr (8.14.1/8.14.1/Debian-9) with ESMTP id l9VBjTYx015922 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 31 Oct 2007 13:45:40 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.1/8.14.1) with ESMTP id l9VBjOfT003503; Wed, 31 Oct 2007 13:45:24 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by kobe.laptop (8.14.1/8.14.1/Submit) id l9VBjLur003502; Wed, 31 Oct 2007 13:45:21 +0200 (EET) (envelope-from keramida@ceid.upatras.gr) Date: Wed, 31 Oct 2007 13:45:20 +0200 From: Giorgos Keramidas To: Howard Jones Message-ID: <20071031114520.GC3140@kobe.laptop> References: <472647A0.3030009@brookes.ac.uk> <20071030130206.GB1178@gilmour.subvert.org.uk> <47279664.1050704@thingy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47279664.1050704@thingy.com> X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-3.988, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.41, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@ceid.upatras.gr X-Spam-Status: No Cc: "Benjamin M. A'Lee" , freebsd-questions@freebsd.org Subject: Re: [freebsd-questions] Dangers of using a non-base shell X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Oct 2007 11:56:13 -0000 On 2007-10-30 20:39, Howard Jones 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 :)