Re: Minor request for enhancement: "beep on halt"

Jason A. Pfeil (pfeil@nu.cs.fsu.edu)
Mon, 14 Dec 1998 23:26:36 -0500 (EST)


On Tue, 15 Dec 1998, Richard Gooch wrote:

> Jason A. Pfeil writes:
> > Verified. You can pass shutdown the -n argument and it handles everything
> > itself. Otherwise, init handles the shutdown. The second (init) method
> > is the recommended method. This functionality might be able to be
> > inserted into init instead of the kernel.
> >
> > On Mon, 14 Dec 1998, Jason A. Pfeil wrote:
> >
> > > In addition to this, on the manpage for shutdown(8), it states that
> > > shutdown triggers the init process to handle the shutdown. shutdown(8)
> > > itself handling the killing of processes is deprecated and not recommended
> > > as it is not predictable. I am in the process of verifying this by
> > > looking at the SRPM from RedHat5.2.
>
> No, this may only apply in the SysV init world. For a non-SysV init,
> it is perfectly legitimate to have shutdown(8) do the real work.

Good point. I haven't checked out a slackware installation lately (or any
others that use BSD-style startup scripts since switching to RedHat
primarily for the SysV-style startup scripts. Any slackware users out
there with insight here?

>
> > > On Mon, 14 Dec 1998, Stephen Harris wrote:
> > >
> > > > Richard Gooch writes:
> > > > > Jason A. Pfeil writes:
> > > >
> > > > > > Shutdown just calls a routine in the kernel to handle the shutdown before
> > > > > > it is killed itself. Therefore, this ability needs to be in the kernel
> > > >
> > > > > Sorry, I don't agree. The shutdown(8) programme is what kills all
> > > > > processes, unmounts filesystems, remounts the root FS read-only, syncs
> > > > > the discs and then calls reboot(2) which halts/reboots.
> > > >
> > > > Could this code be in shutdown(8) ? Hmm, no... there is always the
> > > > possibility that the kernel may need to perform some other "clean up" work.
> > > > Surely this is the concept behind the notifier_call_chain() calls inside
> > > > sys_reboot().
> > > >
> > > > For example, the wdt driver turns off the card at shutdown time. If the
> > > > shutdown(8) program never calls sys_reboot() then the card is never turned
> > > > off, and a watchdog reset could occur. Not good :-) It could cause a
> > > > reboot! Some other drivers also hook into the reboot_notifier_list to
> > > > perform a cleanup on shutdown.
>
> Hm. Point taken.
>
> Regards,
>
> Richard....
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.rutgers.edu
> Please read the FAQ at http://www.tux.org/lkml/
>

----
Jason A. Pfeil pfeil@cs.fsu.edu
Information Systems Developer jpfeil@lsi.fsu.edu
CASDL (850)644-8014; fax: (850)644-4952
Learning Systems Institute University Center C-3527
http://idl.fsu.edu Tallahassee, FL 32306-2540

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/