From owner-freebsd-questions Wed Aug 18 23:54:58 1999 Delivered-To: freebsd-questions@freebsd.org Received: from relay.ucb.crimea.ua (relay.ucb.crimea.ua [212.110.138.1]) by hub.freebsd.org (Postfix) with ESMTP id 260C014F98 for ; Wed, 18 Aug 1999 23:53:56 -0700 (PDT) (envelope-from ru@ucb.crimea.ua) Received: (from ru@localhost) by relay.ucb.crimea.ua (8.9.3/8.9.3/UCB) id JAA25332; Thu, 19 Aug 1999 09:51:23 +0300 (EEST) (envelope-from ru) Date: Thu, 19 Aug 1999 09:51:23 +0300 From: Ruslan Ermilov To: Ludwig Pummer Cc: questions@FreeBSD.ORG Subject: Re: "shutdown -h now" risk? Message-ID: <19990819095123.B27684@relay.ucb.crimea.ua> Mail-Followup-To: Ludwig Pummer , questions@FreeBSD.ORG References: <6C37EE640B78D2118D2F00A0C90FCB4401105BA8@site2s1> <4.2.0.58.19990818161828.00bdc8e0@toy> <19990818181702.A3248@athena.tera.com> <005101bee9f3$de5cc8e0$0200000a@home> <4.2.0.58.19990818210623.00a3dd30@toy> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.3i In-Reply-To: <4.2.0.58.19990818210623.00a3dd30@toy>; from Ludwig Pummer on Wed, Aug 18, 1999 at 09:41:25PM -0700 X-Operating-System: FreeBSD 3.2-STABLE i386 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Aug 18, 1999 at 09:41:25PM -0700, Ludwig Pummer wrote: > At 08:34 PM 8/18/1999 -0700, Dan O'Connor wrote: > >So, I guess the new question is: What's the difference between the way > >"halt" and "reboot" handle shutdowns versus the way "init" does it? And is > >one method preferable over the other? > > > >Enquiring minds want to know... > > Enquiring minds should look in the source. If you don't have a local copy > of it, you can browse it via the CVS web interface on www.freebsd.org > > /usr/src/sbin/init/init.c > /usr/src/sbin/reboot/reboot.c > /usr/src/sbin/shutdown/shutdown.c > > I was going to read through the sources and answer your question, but I > feel I'm woefully inadequate for that task. > > One thing I haven't been able to track down was the reboot() system call. I > found /usr/src/lib/libc/i386/sys/reboot.S and /usr/src/lib/libc/i386/SYS.h, > but nowhere could I find what reboot() does. > /usr/src/sys/kern/kern_shutdown.c, function reboot(). -- Ruslan Ermilov Sysadmin and DBA of the ru@ucb.crimea.ua United Commercial Bank, ru@FreeBSD.org FreeBSD committer, +380.652.247.647 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message