From owner-freebsd-current@FreeBSD.ORG Wed Aug 26 13:24:27 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D819106564A for ; Wed, 26 Aug 2009 13:24:27 +0000 (UTC) (envelope-from spambox@haruhiism.net) Received: from fujibayashi.jp (karas.fujibayashi.jp [77.221.159.4]) by mx1.freebsd.org (Postfix) with ESMTP id DE57C8FC22 for ; Wed, 26 Aug 2009 13:24:26 +0000 (UTC) Received: from [192.168.0.2] (ppp91-122-47-189.pppoe.avangarddsl.ru [91.122.47.189]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by fujibayashi.jp (Postfix) with ESMTPSA id CB45379015; Wed, 26 Aug 2009 17:24:23 +0400 (MSD) Message-ID: <4A953795.9010709@haruhiism.net> Date: Wed, 26 Aug 2009 17:24:37 +0400 From: Kamigishi Rei User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: barbara References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current , noc Subject: Re: Root history not saving over reboot 8* X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2009 13:24:27 -0000 barbara wrote: > I didn't tried pressing ctrl-d, but I can confirm that the history get lost even using shutdown as I use reboot only sometime in single user. > > BTW, isn't ctrl-d the combination for command completion? > I think I mentioned ctrl-d explicitly just because it is *essential* to press it. Ctrl-D performs a clean exit, given that the command line is empty. If one issues "shutdown -r now", the shell is not terminated, as the shutdown command starts the shutdown process in the background - because "now" is not the only option and it basically schedules the shutdown to happen in 0 minutes. After issuing "shutdown -r now" the user is returned to the shell, which remains active until it is killed during the shutdown process. Hitting Ctrl-D immediately after issuing that command ensures that you have "exit"-ed the shell; if that was done before the shutdown kill sequence, and before the filesystems are remounted read-only - that's exactly why I said "immediately" - the shell *will* save the history file. Using "reboot" or hitting Ctrl-Alt-Del on the console terminates all virtual consoles; if a console is terminated, the shell that was running on it exits on "Lost terminal" signal. I do indeed hope that this time my explanation is detailed enough. -- Kamigishi Rei KREI-RIPE