Subject: Re: adding a shutdown hook
To: Dan J Fraser <dfraser@mother.com>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-i386
Date: 07/27/1999 12:02:44
On Thu, 22 Jul 1999, Dan J Fraser wrote:

> I've got some custom code I need to run at shutdown in certain situations,
> namely to raise DTR on my serial port to tell my UPS to shut off.

Does it have to be done in the kernel? If not, you can easily add a
userland shutdown hook. Though the kernel's the right place if twiddling
DTR will actually pull the plug - the userland stuff is executed a few
seconds (maybe 10) before the kernel really shuts down.

Otherwise some sort of pseudo device might be a good way to go.

Take care,

Bill