From owner-freebsd-hackers Mon Jan 6 10:20:15 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id KAA20087 for hackers-outgoing; Mon, 6 Jan 1997 10:20:15 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id KAA20039 for ; Mon, 6 Jan 1997 10:20:01 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA12205; Mon, 6 Jan 1997 11:10:33 -0700 From: Terry Lambert Message-Id: <199701061810.LAA12205@phaeton.artisoft.com> Subject: Re: Shutdown tip To: seanb012@sunbeach.net (Sean Batson) Date: Mon, 6 Jan 1997 11:10:33 -0700 (MST) Cc: hackers@freebsd.org In-Reply-To: <32C87FC1.41C67EA6@sunbeach.net> from "Sean Batson" at Dec 30, 96 10:51:45 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > The next time you guys are about to shutdown try this: > > shutdown -h now;exit > > the above command should be done once all of the users > are logged off. The end results would always be this: > > syncing ...disk > press anykey to reboot. > no buffers to rewrite to the filesystem. > > Just do an ordernary shutdown -h now, you'll get the > usual syncing ..3 4 disk ,... > > How if someone where modify the code for the shutdown > command to do a root user logout then fork or spawn > the rest of the code for the shutdown thus avoiding > the site of the buffer related numbers each time on > a shutdown. The problem is in the use of a non-"/" current directory actig as an open file reference for the processes that are still live. The correct thing to do is to orderly shutdown the processes. You would probably ss the same (correct) behaviour if you forced a shutdown to occur only in "/" (like SVR4 does) and modified the root/chroot fd code to always exist in the process instead of conditionally existing, and then simplifying the namei() code to unconditionally reference the process value. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.