Skip to contentSkip to conversation

shutdown process

DISCUSSION manomugdha biswas 2 participants 2 messages Sep 22, 2004

lore
Share & tools
lore
#0 lore raw

Hi all,
I have written a module and loaded into kernel by
insmod. I want to let my module know when the system is shutdown. How to let my module know that the system is going to shutdown??

Thanks and Regards,
Manomugdha

=====
Manomugdha Biswas

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online Go to: http://yahoo.shaadi.com/india-matrimony

#1 lore raw

On Wed, 22 Sep 2004 08:51:26 +0100 (BST) manomugdha biswas wrote:

| Hi all,
|   I have written a module and loaded into kernel by
| insmod. I want to let my module know when the system
| is shutdown. How to let my module know that the system
| is going to shutdown??

See sig. Answering for Linux 2.6.x, but it looks like almost no changes here from 2.4 to 2.6:

Call notifier_chain_register(&reboot_notifier_list, &notif_block); or
register_reboot_notifier(&notif_block);

--
~Randy
MOTD: Always include version info.
(Again. Sometimes I think ln -s /usr/src/linux/.config .signature)