From owner-freebsd-questions Wed Aug 18 21:43:27 1999 Delivered-To: freebsd-questions@freebsd.org Received: from inet.chip-web.com (c1003518-a.plstn1.sfba.home.com [24.1.82.47]) by hub.freebsd.org (Postfix) with SMTP id B6DFA15078 for ; Wed, 18 Aug 1999 21:43:22 -0700 (PDT) (envelope-from ludwigp@bigfoot.com) Received: (qmail 17900 invoked from network); 19 Aug 1999 04:43:28 -0000 Received: from speedy.chip-web.com (HELO speedy) (172.16.1.1) by inet.chip-web.com with SMTP; 19 Aug 1999 04:43:28 -0000 Message-Id: <4.2.0.58.19990818210623.00a3dd30@toy> X-Sender: ludwigp@toy (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Wed, 18 Aug 1999 21:41:25 -0700 To: "Dan O'Connor" From: Ludwig Pummer Subject: Re: "shutdown -h now" risk? Cc: In-Reply-To: <005101bee9f3$de5cc8e0$0200000a@home> References: <6C37EE640B78D2118D2F00A0C90FCB4401105BA8@site2s1> <4.2.0.58.19990818161828.00bdc8e0@toy> <19990818181702.A3248@athena.tera.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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. --Ludwig Pummer To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message